Remove unnecessary throws clauses for unchecked exceptions

This commit is contained in:
Trustin Lee 2012-11-10 07:07:37 +09:00
parent 4b4c6a436b
commit ac53b9e99e
4 changed files with 8 additions and 8 deletions

View File

@ -15,6 +15,8 @@
*/
package org.jboss.netty.buffer;
import org.jboss.netty.util.internal.DetectionUtil;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@ -26,8 +28,6 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.jboss.netty.util.internal.DetectionUtil;
/**
* A virtual buffer which shows multiple buffers as a single merged buffer. It
* is recommended to use {@link ChannelBuffers#wrappedBuffer(ChannelBuffer...)}
@ -605,7 +605,7 @@ public class CompositeChannelBuffer extends AbstractChannelBuffer {
* @throws IndexOutOfBoundsException when the specified {@code index} is
* less than zero, or larger than {@code capacity()}
*/
public ChannelBuffer getBuffer(int index) throws IndexOutOfBoundsException {
public ChannelBuffer getBuffer(int index) {
if (index < 0 || index >= capacity()) {
throw new IndexOutOfBoundsException("Invalid index: " + index
+ " - Bytes needed: " + index + ", maximum is "

View File

@ -220,7 +220,7 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
* @throws WebSocketHandshakeException
*/
@Override
public void finishHandshake(Channel channel, HttpResponse response) throws WebSocketHandshakeException {
public void finishHandshake(Channel channel, HttpResponse response) {
final HttpResponseStatus status = new HttpResponseStatus(101, "WebSocket Protocol Handshake");
if (!response.getStatus().equals(status)) {

View File

@ -201,7 +201,7 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
* @throws WebSocketHandshakeException
*/
@Override
public void finishHandshake(Channel channel, HttpResponse response) throws WebSocketHandshakeException {
public void finishHandshake(Channel channel, HttpResponse response) {
final HttpResponseStatus status = HttpResponseStatus.SWITCHING_PROTOCOLS;
if (!response.getStatus().equals(status)) {

View File

@ -40,7 +40,7 @@ public class WebSocketClientHandshakerFactory {
* @throws WebSocketHandshakeException
*/
public WebSocketClientHandshaker newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol,
boolean allowExtensions, Map<String, String> customHeaders) throws WebSocketHandshakeException {
boolean allowExtensions, Map<String, String> customHeaders) {
return newHandshaker(webSocketURL, version, subprotocol, allowExtensions, customHeaders, Long.MAX_VALUE);
}
@ -61,11 +61,11 @@ public class WebSocketClientHandshakerFactory {
* @param maxFramePayloadLength
* Maximum allowable frame payload length. Setting this value to your application's
* requirement may reduce denial of service attacks using long data frames.
* @throws WebSocketHandshakeException
*/
public WebSocketClientHandshaker newHandshaker(
URI webSocketURL, WebSocketVersion version, String subprotocol,
boolean allowExtensions, Map<String, String> customHeaders, long maxFramePayloadLength)
throws WebSocketHandshakeException {
boolean allowExtensions, Map<String, String> customHeaders, long maxFramePayloadLength) {
if (version == WebSocketVersion.V13) {
return new WebSocketClientHandshaker13(
webSocketURL, version, subprotocol, allowExtensions, customHeaders, maxFramePayloadLength);