JCLOUDS-1628: Remove Netty driver
3.x has multiple security vulnerabilities but upgrading to 4.x is API
incompatible. Remove due to lack of known users.
diff --git a/drivers/enterprise/pom.xml b/drivers/enterprise/pom.xml
index a50a86a..894b632 100644
--- a/drivers/enterprise/pom.xml
+++ b/drivers/enterprise/pom.xml
@@ -50,11 +50,6 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>jclouds-netty</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
<artifactId>jclouds-bouncycastle</artifactId>
<version>${project.version}</version>
</dependency>
diff --git a/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java b/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java
index abdfd13..a49c46f 100644
--- a/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java
+++ b/drivers/enterprise/src/main/java/org/jclouds/enterprise/config/EnterpriseConfigurationModule.java
@@ -20,7 +20,6 @@
import org.jclouds.concurrent.config.ExecutorServiceModule;
import org.jclouds.date.joda.config.JodaDateServiceModule;
import org.jclouds.encryption.bouncycastle.config.BouncyCastleCryptoModule;
-import org.jclouds.netty.config.NettyPayloadModule;
import com.google.common.util.concurrent.ListeningExecutorService;
@@ -52,7 +51,6 @@
protected void configure() {
install(new BouncyCastleCryptoModule());
install(new JodaDateServiceModule());
- install(new NettyPayloadModule());
}
}
diff --git a/drivers/netty/bnd.bnd b/drivers/netty/bnd.bnd
deleted file mode 100644
index 70bc93d..0000000
--- a/drivers/netty/bnd.bnd
+++ /dev/null
@@ -1,2 +0,0 @@
-Export-Package: \
- org.jclouds.netty.*;version="${project.version}";-noimport:=true
\ No newline at end of file
diff --git a/drivers/netty/pom.xml b/drivers/netty/pom.xml
deleted file mode 100644
index 1abb5c7..0000000
--- a/drivers/netty/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-project</artifactId>
- <version>2.6.0-SNAPSHOT</version>
- <relativePath>../../project/pom.xml</relativePath>
- </parent>
- <groupId>org.apache.jclouds.driver</groupId>
- <artifactId>jclouds-netty</artifactId>
- <name>jclouds netty payload module</name>
- <description>jclouds netty payload module</description>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.jclouds</groupId>
- <artifactId>jclouds-core</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.netty</groupId>
- <artifactId>netty</artifactId>
- <version>3.10.6.Final</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
-
-</project>
diff --git a/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java b/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java
deleted file mode 100644
index 10ec0ee..0000000
--- a/drivers/netty/src/main/java/org/jclouds/netty/config/NettyPayloadModule.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.netty.config;
-
-import org.jclouds.io.PayloadSlicer;
-import org.jclouds.netty.io.NettyPayloadSlicer;
-
-import com.google.inject.AbstractModule;
-
-public class NettyPayloadModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(PayloadSlicer.class).to(NettyPayloadSlicer.class);
- }
-
-}
diff --git a/drivers/netty/src/main/java/org/jclouds/netty/io/ChunkedFileInputStream.java b/drivers/netty/src/main/java/org/jclouds/netty/io/ChunkedFileInputStream.java
deleted file mode 100644
index 6b3e684..0000000
--- a/drivers/netty/src/main/java/org/jclouds/netty/io/ChunkedFileInputStream.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.netty.io;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.RandomAccessFile;
-
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.handler.stream.ChunkedFile;
-
-public class ChunkedFileInputStream extends InputStream {
-
- private static final int CHUNK_SIZE = 8192;
-
- private ChunkedFile chunks;
- private ChannelBuffer chunk;
-
- private IOException ex;
-
- public ChunkedFileInputStream(String filename, long offset, long length) {
- this(new File(filename), offset, length);
- }
-
- public ChunkedFileInputStream(File file, long offset, long length) {
- try {
- this.chunks = new ChunkedFile(new RandomAccessFile(file, "r"), offset, length, CHUNK_SIZE);
- } catch (IOException ex) {
- this.ex = ex;
- }
- }
-
- private ChannelBuffer getChunk() throws Exception {
- if (ex != null) {
- throw ex;
- }
- if (chunk == null) {
- chunk = ChannelBuffer.class.cast(chunks.nextChunk());
- }
- if (chunk != null) {
- if (chunk.readableBytes() < 1 && chunks.hasNextChunk()) {
- chunk = ChannelBuffer.class.cast(chunks.nextChunk());
- if (chunk.readableBytes() < 1) {
- return null;
- }
- }
- } else {
- return null;
- }
- return chunk;
- }
-
- @Override
- public int read() throws IOException {
- try {
- ChannelBuffer chunk = getChunk();
- if (chunk == null)
- return -1;
- if (chunk.readableBytes() < 1)
- return -1;
- int readIndex = chunk.readerIndex();
- byte abyte = chunk.getByte(readIndex);
- chunk.readerIndex(readIndex + 1);
- return (int) abyte;
- } catch (Exception e) {
- throw new IOException(e);
- }
- }
-
- @Override
- public int read(byte[] b, int off, int len) throws IOException {
- try {
- ChannelBuffer chunk = getChunk();
- if (chunk == null)
- return -1;
- int readable = chunk.readableBytes();
- if (readable < 1)
- return -1;
- if (readable > len) {
- readable = len;
- }
- int readIndex = chunk.readerIndex();
- chunk.getBytes(readIndex, b, off, readable);
- chunk.readerIndex(readIndex + readable);
- return readable;
- } catch (Exception e) {
- throw new IOException(e);
- }
- }
-
- @Override
- public void close() throws IOException {
- try {
- chunks.close();
- } catch (Exception e) {
- throw new IOException(e);
- }
- }
-
-}
diff --git a/drivers/netty/src/main/java/org/jclouds/netty/io/NettyPayloadSlicer.java b/drivers/netty/src/main/java/org/jclouds/netty/io/NettyPayloadSlicer.java
deleted file mode 100644
index eac796c..0000000
--- a/drivers/netty/src/main/java/org/jclouds/netty/io/NettyPayloadSlicer.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.netty.io;
-
-import java.io.File;
-
-import jakarta.inject.Singleton;
-
-import org.jclouds.io.Payload;
-import org.jclouds.io.Payloads;
-import org.jclouds.io.internal.BasePayloadSlicer;
-
-@Singleton
-public class NettyPayloadSlicer extends BasePayloadSlicer {
-
- @Override
- protected Payload doSlice(File content, long offset, long length) {
- return Payloads.newInputStreamPayload(new ChunkedFileInputStream(content, offset, length));
- }
-
-}
diff --git a/drivers/pom.xml b/drivers/pom.xml
index 6492c40..16ad7ad 100644
--- a/drivers/pom.xml
+++ b/drivers/pom.xml
@@ -35,7 +35,6 @@
<module>joda</module>
<module>jsch</module>
<module>log4j</module>
- <module>netty</module>
<module>okhttp</module>
<module>slf4j</module>
<module>sshj</module>