You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/10/18 16:36:21 UTC
svn commit: r1399676 - in
/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd:
XSDbase64Binary.java XSDhexBinary.java
Author: andy
Date: Thu Oct 18 14:36:20 2012
New Revision: 1399676
URL: http://svn.apache.org/viewvc?rev=1399676&view=rev
Log:
Align comments. Note chance for sharing (but not a couple of days before a release!).
Modified:
jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDbase64Binary.java
jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDhexBinary.java
Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDbase64Binary.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDbase64Binary.java?rev=1399676&r1=1399675&r2=1399676&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDbase64Binary.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDbase64Binary.java Thu Oct 18 14:36:20 2012
@@ -32,7 +32,8 @@ import com.hp.hpl.jena.graph.impl.Litera
* @version $Revision: 1.1 $ on $Date: 2009-06-29 08:56:03 $
*/
public class XSDbase64Binary extends XSDDatatype {
-
+ // See also XSDhexBinary.
+ // XSDhexBinary and XSDbase64Binary could share via XSDBaseBinary.
/**
* Constructor.
* @param typeName the name of the XSD type to be instantiated, this is
@@ -79,7 +80,8 @@ public class XSDbase64Binary extends XSD
@Override
public int getHashCode( LiteralLabel lit )
{
- // Java arrays are not equal by value.
+ // Can't use super.getHashCode as that does "value.hashCode"
+ // Java arrays are not equal by value and their hash code of the sameValue array are different.
if ( lit.isWellFormed() )
return getHashCode( (byte []) lit.getValue() );
else
Modified: jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDhexBinary.java
URL: http://svn.apache.org/viewvc/jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDhexBinary.java?rev=1399676&r1=1399675&r2=1399676&view=diff
==============================================================================
--- jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDhexBinary.java (original)
+++ jena/trunk/jena-core/src/main/java/com/hp/hpl/jena/datatypes/xsd/XSDhexBinary.java Thu Oct 18 14:36:20 2012
@@ -32,11 +32,14 @@ import com.hp.hpl.jena.graph.impl.Litera
* @version $Revision: 1.1 $ on $Date: 2009-06-29 08:56:03 $
*/
public class XSDhexBinary extends XSDDatatype {
-
+ // See also XSDbase64Binary.
+ // XSDhexBinary and XSDbase64Binary could share via XSDBaseBinary.
+
/**
* Constructor.
* @param typeName the name of the XSD type to be instantiated, this is
- * used to lookup a type definition from the Xerces schema factory.
+ * used to lookup a type
+ definition from the Xerces schema factory.
*/
public XSDhexBinary(String typeName) {
super(typeName, null);
@@ -80,7 +83,7 @@ public class XSDhexBinary extends XSDDat
public int getHashCode( LiteralLabel lit )
{
// Can't use super.getHashCode as that does "value.hashCode"
- // Java arrays are not equal by value and their has code of the sameValue array are different.
+ // Java arrays are not equal by value and their hash code of the sameValue array are different.
if ( lit.isWellFormed() )
return getHashCode( (byte []) lit.getValue() );
else