Compare commits

..

8 Commits

6 changed files with 29 additions and 10 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>

View File

@ -9,9 +9,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- name: Set up JDK 1.8 - name: Set up JDK 11
uses: actions/setup-java@v1 uses: actions/setup-java@v1
with: with:
java-version: 1.8 java-version: 11
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn -B package --file pom.xml

View File

@ -1,8 +1,8 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.source=11

15
pom.xml
View File

@ -5,7 +5,7 @@
<groupId>informatik-ag-ngl</groupId> <groupId>informatik-ag-ngl</groupId>
<artifactId>java-nio-server</artifactId> <artifactId>java-nio-server</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.1-beta</version>
<name>java-nio-server</name> <name>java-nio-server</name>
<url>https://github.com/informatik-ag-ngl/java-nio-server</url> <url>https://github.com/informatik-ag-ngl/java-nio-server</url>
@ -13,8 +13,8 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>11</maven.compiler.target>
</properties> </properties>
<dependencies> <dependencies>
@ -28,6 +28,15 @@
<build> <build>
<finalName>java-nio-server</finalName> <finalName>java-nio-server</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>

View File

@ -67,7 +67,7 @@ public class Message {
while (this.length + remaining > capacity) while (this.length + remaining > capacity)
if (!this.messageBuffer.expandMessage(this)) return -1; if (!this.messageBuffer.expandMessage(this)) return -1;
int bytesToCopy = Math.min(remaining, capacity - length); int bytesToCopy = Math.min(remaining, capacity - this.length);
System.arraycopy(byteArray, offset, sharedArray, this.offset + this.length, bytesToCopy); System.arraycopy(byteArray, offset, sharedArray, this.offset + this.length, bytesToCopy);
this.length += bytesToCopy; this.length += bytesToCopy;
return bytesToCopy; return bytesToCopy;

View File

@ -0,0 +1,10 @@
/**
* Contains the entire server API.
*
* @author Kai S. K. Engelbart
* @since java-nio-server v0.1-beta
*/
module java.nio.server {
exports com.jenkov.nioserver;
}