Skip to content

Commit

Permalink
Исправил поведение при ошибочном приведении типа в runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
demidko committed Sep 11, 2021
1 parent 32b7eec commit 5b09524
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/main/java/com/github/demidko/aot/ImmutableWordList.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,47 +60,47 @@ public Object[] toArray() {

@Override
public <T> T[] toArray(T[] ts) {
return (T[]) arr;
throw new UnsupportedOperationException();
}

@Override
public boolean add(Word word) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean remove(Object o) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean containsAll(Collection<?> collection) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean addAll(Collection<? extends Word> collection) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean addAll(int i, Collection<? extends Word> collection) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean removeAll(Collection<?> collection) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public boolean retainAll(Collection<?> collection) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public void clear() {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
Expand All @@ -110,17 +110,17 @@ public Word get(int i) {

@Override
public Word set(int i, Word word) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public void add(int i, Word word) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public Word remove(int i) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
Expand All @@ -146,16 +146,16 @@ public int lastIndexOf(Object o) {

@Override
public ListIterator<Word> listIterator() {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public ListIterator<Word> listIterator(int i) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}

@Override
public List<Word> subList(int i, int i1) {
throw new IllegalStateException("Not implemented");
throw new UnsupportedOperationException();
}
}
}

0 comments on commit 5b09524

Please sign in to comment.