Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
@@ -199,8 +199,7 @@ protected Object access(DynamicObject object) {
final Rope rope = Layouts.STRING.getRope(object);

if (emptyProfile.profile(rope.byteLength() == 0)) {
unsuported();
throw new IllegalStateException();
throw UnsupportedMessageException.raise(Message.UNBOX);
} else {
return rope.get(0);
}
@@ -209,11 +208,6 @@ protected Object access(DynamicObject object) {
}
}

@CompilerDirectives.TruffleBoundary
private void unsuported() {
UnsupportedMessageException.raise(Message.UNBOX);
}

}

@Resolve(message = "WRITE")

0 comments on commit 100d655

Please sign in to comment.