Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j.tcp')
-rw-r--r--plugins/org.eclipse.net4j.tcp/.settings/org.eclipse.jdt.core.prefs43
-rw-r--r--plugins/org.eclipse.net4j.tcp/META-INF/MANIFEST.MF14
-rw-r--r--plugins/org.eclipse.net4j.tcp/pom.xml2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java7
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java9
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLBuffer.java10
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLServerConnector.java3
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/tcp/TCPUtil.java19
8 files changed, 76 insertions, 31 deletions
diff --git a/plugins/org.eclipse.net4j.tcp/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.net4j.tcp/.settings/org.eclipse.jdt.core.prefs
index c2d0341c93..97144f555d 100644
--- a/plugins/org.eclipse.net4j.tcp/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/org.eclipse.net4j.tcp/.settings/org.eclipse.jdt.core.prefs
@@ -17,6 +17,15 @@ org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -26,6 +35,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
+org.eclipse.jdt.core.compiler.problem.APILeak=warning
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
@@ -36,7 +46,9 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
@@ -55,7 +67,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
@@ -65,36 +79,58 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=disabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=ignore
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=ignore
+org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
+org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
@@ -104,8 +140,13 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+<<<<<<< websockets
+=======
+org.eclipse.jdt.core.compiler.release=enabled
+>>>>>>> c1ed48e [561115] Implement a Websocket-based transport for Net4j
org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW
diff --git a/plugins/org.eclipse.net4j.tcp/META-INF/MANIFEST.MF b/plugins/org.eclipse.net4j.tcp/META-INF/MANIFEST.MF
index 74532cdd0e..cdd1a74458 100644
--- a/plugins/org.eclipse.net4j.tcp/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.net4j.tcp/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.net4j.tcp;singleton:=true
-Bundle-Version: 4.2.0.qualifier
+Bundle-Version: 4.2.1.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -12,13 +12,13 @@ Bundle-ClassPath: .
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)";resolution:=optional,
org.eclipse.net4j;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
Import-Package: org.osgi.framework;version="[1.3.0,2.0.0)";resolution:=optional
-Export-Package: org.eclipse.net4j.internal.tcp;version="4.2.0";
+Export-Package: org.eclipse.net4j.internal.tcp;version="4.2.1";
x-friends:="org.eclipse.net4j.tests,
org.eclipse.emf.cdo.examples,
org.eclipse.net4j.ui",
- org.eclipse.net4j.internal.tcp.bundle;version="4.2.0";x-internal:=true,
- org.eclipse.net4j.internal.tcp.messages;version="4.2.0";x-internal:=true,
- org.eclipse.net4j.internal.tcp.ssl;version="4.2.0";x-friends:="org.eclipse.net4j.tests,org.eclipse.emf.cdo.examples",
- org.eclipse.net4j.tcp;version="4.2.0",
- org.eclipse.net4j.tcp.ssl;version="4.2.0"
+ org.eclipse.net4j.internal.tcp.bundle;version="4.2.1";x-internal:=true,
+ org.eclipse.net4j.internal.tcp.messages;version="4.2.1";x-internal:=true,
+ org.eclipse.net4j.internal.tcp.ssl;version="4.2.1";x-friends:="org.eclipse.net4j.tests,org.eclipse.emf.cdo.examples",
+ org.eclipse.net4j.tcp;version="4.2.1",
+ org.eclipse.net4j.tcp.ssl;version="4.2.1"
Automatic-Module-Name: org.eclipse.net4j.tcp
diff --git a/plugins/org.eclipse.net4j.tcp/pom.xml b/plugins/org.eclipse.net4j.tcp/pom.xml
index 4079e5e843..4ae1683b9f 100644
--- a/plugins/org.eclipse.net4j.tcp/pom.xml
+++ b/plugins/org.eclipse.net4j.tcp/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.net4j.tcp</artifactId>
- <version>4.2.0-SNAPSHOT</version>
+ <version>4.2.1-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
index 408f377cea..d4d281398e 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
@@ -268,7 +268,12 @@ public class TCPAcceptor extends Acceptor implements ITCPAcceptor, ITCPPassiveSe
cancelSelectionKey();
- IOUtil.closeSilent(serverSocketChannel);
+ Exception ex = IOUtil.closeSilent(serverSocketChannel);
+ if (ex != null && TRACER.isEnabled())
+ {
+ TRACER.trace(ex);
+ }
+
serverSocketChannel = null;
super.doDeactivate();
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 7aa47c9e37..8d44405277 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -311,6 +311,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
IBuffer buffer = channelSendQueue.peek();
if (buffer != null)
{
+ // The CCAM flag must be remembered *before* the buffer.write() call below!
boolean closeChannelAfterMe = buffer.isCCAM();
if (buffer.write(socketChannel))
@@ -318,11 +319,11 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
writeQueue.poll();
channelSendQueue.poll();
buffer.release();
- }
- if (closeChannelAfterMe)
- {
- channel.close();
+ if (closeChannelAfterMe)
+ {
+ channel.close();
+ }
}
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLBuffer.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLBuffer.java
index e5c0fd394a..87a2d59709 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLBuffer.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLBuffer.java
@@ -88,8 +88,6 @@ public class SSLBuffer extends Buffer
payloadSize = (short)-payloadSize;
}
- payloadSize -= MAKE_PAYLOAD_SIZE_NON_ZERO;
-
setPosition(IBuffer.HEADER_SIZE);
setState(BufferState.READING_HEADER);
@@ -118,7 +116,6 @@ public class SSLBuffer extends Buffer
{
try
{
-
if (sslEngineManager.getPacketSendBuf().position() > 0)
{
sslEngineManager.handleWrite(socketChannel);
@@ -146,8 +143,9 @@ public class SSLBuffer extends Buffer
throw new IllegalStateException("channelID == NO_CHANNEL"); //$NON-NLS-1$
}
- int payloadSize = getPosition() - IBuffer.HEADER_SIZE + MAKE_PAYLOAD_SIZE_NON_ZERO;
- if (isEOS())
+ int payloadSize = getPosition() - HEADER_SIZE;
+ boolean eos = isEOS();
+ if (eos)
{
payloadSize = -payloadSize;
}
@@ -155,7 +153,7 @@ public class SSLBuffer extends Buffer
if (TRACER.isEnabled())
{
TRACER.trace("Writing " + (Math.abs(payloadSize) - 1) + " bytes" //$NON-NLS-1$ //$NON-NLS-2$
- + (isEOS() ? " (EOS)" : "") + StringUtil.NL + formatContent(false)); //$NON-NLS-1$ //$NON-NLS-2$
+ + (eos ? " (EOS)" : "") + StringUtil.NL + formatContent(false)); //$NON-NLS-1$ //$NON-NLS-2$
}
getByteBuffer().flip();
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLServerConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLServerConnector.java
index cba4e86790..3cd031ef23 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLServerConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/ssl/SSLServerConnector.java
@@ -11,6 +11,7 @@
*/
package org.eclipse.net4j.internal.tcp.ssl;
+import org.eclipse.net4j.connector.IServerConnector;
import org.eclipse.net4j.internal.tcp.bundle.OM;
import org.eclipse.net4j.tcp.ITCPSelector;
@@ -25,7 +26,7 @@ import java.text.MessageFormat;
* @author Caspar De Groot (No Magic Asia Ltd.)
* @since 4.0
*/
-public class SSLServerConnector extends SSLConnector
+public class SSLServerConnector extends SSLConnector implements IServerConnector
{
private SSLAcceptor acceptor;
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/tcp/TCPUtil.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/tcp/TCPUtil.java
index ce77146327..c8f879439f 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/tcp/TCPUtil.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/tcp/TCPUtil.java
@@ -18,8 +18,8 @@ import org.eclipse.net4j.util.StringUtil;
import org.eclipse.net4j.util.container.IManagedContainer;
import org.eclipse.net4j.util.factory.ProductCreationException;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.net.URI;
+import java.net.URISyntaxException;
/**
* A utility class with static convenience methods.
@@ -222,12 +222,12 @@ public final class TCPUtil
{
try
{
- URL url = parse(description);
- userID = url.getUserInfo();
- host = url.getHost();
- port = url.getPort();
+ URI uri = parse(description);
+ userID = uri.getUserInfo();
+ host = uri.getHost();
+ port = uri.getPort();
}
- catch (MalformedURLException ex)
+ catch (URISyntaxException ex)
{
throw new ProductCreationException(ex);
}
@@ -338,10 +338,9 @@ public final class TCPUtil
return result;
}
- private static URL parse(String description) throws MalformedURLException
+ private static URI parse(String description) throws URISyntaxException
{
- // Scheme "tcp://" would be rejected!
- return new URL("http://" + description); // TODO Don't use URL
+ return new URI("tcp://" + description);
}
}
}

Back to the top