Skip to content

Commit

Permalink
Restore Exceptions needed for external sources
Browse files Browse the repository at this point in the history
  • Loading branch information
klaren committed Feb 9, 2018
1 parent 9dfdb89 commit 6e33ef6
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,22 @@
public class LifecycleAdapter implements Lifecycle
{
@Override
public void init()
throws Throwable
public void init() throws Throwable
{
}

@Override
public void start()
throws Throwable
public void start() throws Throwable
{
}

@Override
public void stop()
throws Throwable
public void stop() throws Throwable
{
}

@Override
public void shutdown()
throws Throwable
public void shutdown() throws Throwable
{
}
}
4 changes: 3 additions & 1 deletion community/ssl/src/main/java/org/neo4j/ssl/SslPolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ private io.netty.handler.ssl.ClientAuth forNetty( ClientAuth clientAuth )
}
}

@SuppressWarnings( "unused" )
public SslHandler nettyServerHandler( Channel channel ) throws SSLException
{
return makeNettyHandler( channel, nettyServerContext() );
}

@SuppressWarnings( "unused" )
public SslHandler nettyClientHandler( Channel channel ) throws SSLException
{
return makeNettyHandler( channel, nettyClientContext() );
Expand All @@ -112,7 +114,7 @@ private SslHandler makeNettyHandler( Channel channel, SslContext sslContext )
SSLEngine sslEngine = sslContext.newEngine( channel.alloc() );
if ( tlsVersions != null )
{
sslEngine.setEnabledProtocols( tlsVersions.toArray( new String[tlsVersions.size()] ) );
sslEngine.setEnabledProtocols( tlsVersions.toArray( new String[0] ) );
}
return new SslHandler( sslEngine );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private class CatchUpChannel implements CatchUpChannelPool.Channel
Bootstrap bootstrap = new Bootstrap().group( eventLoopGroup ).channel( NioSocketChannel.class ).handler( new ChannelInitializer<SocketChannel>()
{
@Override
protected void initChannel( SocketChannel ch )
protected void initChannel( SocketChannel ch ) throws Exception
{
CatchUpClientChannelPipeline.initChannel( ch, handler, logProvider, monitors, pipelineWrapper );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private CatchUpClientChannelPipeline()
}

static void initChannel( SocketChannel ch, CatchUpResponseHandler handler, LogProvider logProvider,
Monitors monitors, PipelineWrapper pipelineWrapper )
Monitors monitors, PipelineWrapper pipelineWrapper ) throws Exception
{
CatchupClientProtocol protocol = new CatchupClientProtocol();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public synchronized void start()
.localAddress( listenAddress.socketAddress() ).childHandler( new ChannelInitializer<SocketChannel>()
{
@Override
protected void initChannel( SocketChannel ch )
protected void initChannel( SocketChannel ch ) throws Exception
{
CatchupServerProtocol protocol = new CatchupServerProtocol();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public RaftProtocolClientInstaller( LogProvider logProvider, NettyPipelineBuilde
}

@Override
public void install( Channel channel )
public void install( Channel channel ) throws Exception
{
clientPipelineBuilderFactory.create( channel, log )
.addFraming()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public RaftProtocolServerInstaller( ChannelInboundHandler raftMessageHandler, Ne
}

@Override
public void install( Channel channel )
public void install( Channel channel ) throws Exception
{
pipelineBuilderFactory.create( channel, log )
.addFraming()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
*/
public interface PipelineWrapper
{
default List<ChannelHandler> handlersFor( Channel channel )
@SuppressWarnings( "RedundantThrows" )
default List<ChannelHandler> handlersFor( Channel channel ) throws Exception
{
return emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public NettyPipelineBuilderFactory( PipelineWrapper wrapper )
this.wrapper = wrapper;
}

public NettyPipelineBuilder create( Channel channel, Log log )
public NettyPipelineBuilder create( Channel channel, Log log ) throws Exception
{
ChannelPipeline pipeline = channel.pipeline();
NettyPipelineBuilder builder = NettyPipelineBuilder.with( pipeline, log );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ protected ProtocolInstaller( Protocol protocol )
this.protocol = protocol;
}

public abstract void install( Channel channel );
public abstract void install( Channel channel ) throws Exception;

public final Protocol protocol()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public HandshakeClientInitializer( LogProvider logProvider, ProtocolRepository p
this.timeoutStrategy = new ExponentialBackoffStrategy( 1, 2000, MILLISECONDS );
}

private void installHandlers( Channel channel, HandshakeClient handshakeClient )
private void installHandlers( Channel channel, HandshakeClient handshakeClient ) throws Exception
{
pipelineBuilderFactory.create( channel, log )
.addFraming()
Expand All @@ -75,7 +75,7 @@ private void installHandlers( Channel channel, HandshakeClient handshakeClient )
}

@Override
protected void initChannel( SocketChannel channel )
protected void initChannel( SocketChannel channel ) throws Exception
{
log.info( "Initiating channel: " + channel );
HandshakeClient handshakeClient = new HandshakeClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public HandshakeServerInitializer( LogProvider logProvider, ProtocolRepository p
}

@Override
public void initChannel( SocketChannel ch )
public void initChannel( SocketChannel ch ) throws Exception
{
pipelineBuilderFactory.create( ch, log )
.addFraming()
Expand Down

0 comments on commit 6e33ef6

Please sign in to comment.