diff options
author | Andreas Abraham <aabraham@iaik.tugraz.at> | 2018-05-14 15:19:46 +0200 |
---|---|---|
committer | Andreas Abraham <aabraham@iaik.tugraz.at> | 2018-05-14 15:19:46 +0200 |
commit | 06d9e77445fddb296ddb6306b916fc50e09d127c (patch) | |
tree | 8f4f3547ac55fabeaa42f73f0ffeffae89f0cc09 | |
parent | 9e24a02d80e13273ec5d1d4fa9b3a95d8ae486c2 (diff) | |
download | mocca-06d9e77445fddb296ddb6306b916fc50e09d127c.tar.gz mocca-06d9e77445fddb296ddb6306b916fc50e09d127c.tar.bz2 mocca-06d9e77445fddb296ddb6306b916fc50e09d127c.zip |
cast to base class added related to java api change from 8 to 9
-rw-r--r-- | BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java | 5 | ||||
-rw-r--r-- | pom.xml | 16 |
2 files changed, 10 insertions, 11 deletions
diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java index a7accd83..7beb24d5 100644 --- a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java +++ b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java @@ -30,6 +30,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; +import java.nio.Buffer; import java.nio.CharBuffer; import java.nio.charset.Charset; @@ -80,13 +81,13 @@ public class TextValidator implements Validator { char c; CharBuffer cb = CharBuffer.allocate(256); for (int l; (l = reader.read(cb)) != -1;) { - cb.flip(); + ((Buffer)cb).flip(); //java 9 workaround for (int i = 0; i < l; i++) { c = cb.get(); if (!viewerFont.canDisplay(c)) invalid(c); } } - cb.clear(); + ((Buffer)cb).clear(); //java 9 workaround } catch (IOException e) { // TODO: localize throw new ValidationException(e); @@ -79,15 +79,13 @@ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>2.1</version>
- <configuration>
- <!--
- <fork>true</fork>
- <executable>${java_150_sun}/bin/javac</executable>
- <compilerVersion>1.5</compilerVersion>
- -->
- <source>1.6</source>
- <target>1.6</target>
+ <version>3.7.0</version>
+ <configuration>
+ <fork>true</fork>
+ <executable>${env.JAVA_HOME}\bin\javac.exe</executable>
+ <compilerVersion>9</compilerVersion>
+ <source>1.7</source>
+ <target>1.7</target>
<verbose>true</verbose>
<showWarnings>true</showWarnings>
<encoding>UTF-8</encoding>
|