Skip to content

Commit

Permalink
[SPARK-8301] changed visibility of set to protected. Changed annotati…
Browse files Browse the repository at this point in the history
…on of bytes from Nullable to Nonnull
  • Loading branch information
tarekbecker committed Jun 15, 2015
1 parent d2fb05f commit a5f853a
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;

import org.apache.spark.unsafe.PlatformDependent;

Expand All @@ -34,7 +34,7 @@
*/
public final class UTF8String implements Comparable<UTF8String>, Serializable {

@Nullable
@Nonnull
private byte[] bytes;

private static int[] bytesOfCodePointInUTF8 = {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
Expand All @@ -55,7 +55,7 @@ public static UTF8String fromString(String str) {
/**
* Updates the UTF8String with String.
*/
public UTF8String set(final String str) {
protected UTF8String set(final String str) {
if (str == null) {
bytes = new byte[0];
} else {
Expand All @@ -73,7 +73,7 @@ public UTF8String set(final String str) {
/**
* Updates the UTF8String with byte[], which should be encoded in UTF-8.
*/
public UTF8String set(final byte[] bytes) {
protected UTF8String set(final byte[] bytes) {
this.bytes = (bytes != null) ? bytes : new byte[0];
return this;
}
Expand Down

0 comments on commit a5f853a

Please sign in to comment.