Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/GHNotificationStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ private long calcNextCheckTime(GitHubResponse<GHThread[]> response) {
long seconds = Integer.parseInt(v);
return System.currentTimeMillis() + seconds * 1000;
}

public void remove() {
throw new UnsupportedOperationException();
}
};
}

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/GHPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ public List<GHRepository> next() {
r.root = root;
return Arrays.asList(batch);
}

public void remove() {
throw new UnsupportedOperationException();
}
};
}
};
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/GitHubPageIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,6 @@ public GitHubResponse<T> finalResponse() {
return finalResponse;
}

public void remove() {
throw new UnsupportedOperationException();
}

/**
* Fetch is called at the start of {@link #hasNext()} or {@link #next()} to fetch another page of data if it is
* needed.
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/PagedIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@ private void fetch() {
}
}

public void remove() {
throw new UnsupportedOperationException();
}

/**
* Gets the next page worth of data.
*
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/kohsuke/github/PagedSearchIterable.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ public T[] next() {
result = v;
return v.getItems(root);
}

public void remove() {
throw new UnsupportedOperationException();
}
};
}
}
8 changes: 8 additions & 0 deletions src/test/java/org/kohsuke/github/GitHubTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ public void testListAllRepositories() throws Exception {
assertNotNull(r.getUrl());
assertNotEquals(0L, r.getId());
}

// ensure the iterator throws as expected
try {
itr.remove();
fail();
} catch (UnsupportedOperationException e) {
assertThat(e, notNullValue());
}
}

@Test
Expand Down