Skip to content

Commit

Permalink
Retracts some exposure of code-point comparison methods
Browse files Browse the repository at this point in the history
From UTF8StringValue since StringSchemaKey no longer uses it
  • Loading branch information
tinwelint committed Mar 26, 2018
1 parent e5415d9 commit 59f6336
Showing 1 changed file with 2 additions and 19 deletions.
Expand Up @@ -342,24 +342,11 @@ public int compareTo( TextValue other )

public static int codePointByteArrayCompare( byte[] value1, byte[] value2 )
{
return codePointByteArrayCompare( value1, 0, value1.length,
value2, 0, value2.length, false );
return codePointByteArrayCompare( value1, 0, value1.length, value2, 0, value2.length );
}

public static int codePointByteArrayCompare( byte[] value1, int value1Offset, int value1Length,
byte[] value2, int value2Offset, int value2Length )
{
return codePointByteArrayCompare( value1, value1Offset, value1Length,
value2, value2Offset, value2Length, false );
}

public static int codePointByteArrayCompare( byte[] value1, byte[] value2, boolean ignoreLength )
{
return codePointByteArrayCompare( value1, 0, value1.length, value2, 0, value2.length, ignoreLength );
}

public static int codePointByteArrayCompare( byte[] value1, int value1Offset, int value1Length,
byte[] value2, int value2Offset, int value2Length, boolean ignoreLength )
{
int len1 = value1.length;
int len2 = value2.length;
Expand Down Expand Up @@ -391,11 +378,7 @@ public static int codePointByteArrayCompare( byte[] value1, int value1Offset, in
return thisCodePoint - thatCodePoint;
}
}
if ( !ignoreLength )
{
return numberOfCodePoints( value1, value1Offset, value1Length ) - numberOfCodePoints( value2, value2Offset, value2Length );
}
return 0;
return numberOfCodePoints( value1, value1Offset, value1Length ) - numberOfCodePoints( value2, value2Offset, value2Length );
}

@Override
Expand Down

0 comments on commit 59f6336

Please sign in to comment.