mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-22 21:55:54 +00:00
Update complier plugin and use compatible flip().
This commit is contained in:
@@ -21,6 +21,7 @@ package org.archive.modules.net;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.Serializable;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
@@ -89,7 +90,9 @@ public class Robotstxt implements Serializable {
|
||||
protected void initializeFromReader(Reader reader) throws IOException {
|
||||
CharBuffer buffer = CharBuffer.allocate(MAX_SIZE);
|
||||
while (buffer.hasRemaining() && reader.read(buffer) >= 0) ;
|
||||
buffer.flip();
|
||||
//buffer.flip();
|
||||
// Explicit cast as per https://stackoverflow.com/questions/61267495/exception-in-thread-main-java-lang-nosuchmethoderror-java-nio-bytebuffer-flip
|
||||
((Buffer) buffer).flip();
|
||||
|
||||
String[] lines = LINE_SEPARATOR.split(buffer);
|
||||
if (buffer.limit() == buffer.capacity()) {
|
||||
|
||||
@@ -385,7 +385,7 @@ http://maven.apache.org/guides/mini/guide-m1-m2.html
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
|
||||
Reference in New Issue
Block a user