Skip to content

Commit

Permalink
#4 Upgrade 3rd party library, support Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
amosshi committed May 1, 2022
1 parent bfdf18a commit d60d552
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* @author Amos Shi
* @see
* <a href="https://docs.oracle.com/javase/specs/jvms/se17/html/jvms-4.html#jvms-4.4.5">
* VM Spec: The CONSTANT_Double_info Structure
* VM Spec: The CONSTANT_Double_info Structure</a>
*
* <pre>
* java:S101 - Class names should comply with a naming convention --- We respect the name from JVM Spec instead
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ public class Identification extends FileComponent implements GenerateTreeNode {
/**
* Magic number of ELF file: <code>0x7F454C46</code>.
*
* @see {@link #MAGIC_NUMBER}
* @see #MAGIC_NUMBER
*/
public final int EI_MAG;

/**
* ELF classification: 32- or 64-bit.
*
* @see {@link ElfClass}
* @see ElfClass
*/
public final ElfClass EI_CLASS;

Expand All @@ -75,7 +75,7 @@ public class Identification extends FileComponent implements GenerateTreeNode {
/**
* Little or big endianness.
*
* @see {@link Endianness}
* @see Endianness
*/
public final Endianness EI_DATA;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class MarkerParse {
* @param pDisFile Data Input Stream for <code>file</code> byte array
* @return The generated proper marker instance
* @throws IOException
* @throws JPEGFileFormatException
* @throws FileFormatException
*/
public static Marker parse(final PosDataInputStream pDisFile) throws IOException, FileFormatException {
Marker marker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class IFD extends FileComponent {
* @param startPosTiff
* @param byteArrayTiff
* @throws IOException
* @throws JPEGFileFormatException
* @throws FileFormatException
*/
protected IFD(final PosDataInputStream pDIS, int byteOrder, int tag, int type, int startPosTiff, byte[] byteArrayTiff) throws IOException, FileFormatException {
super.startPos = pDIS.getPos() - 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public FileComponent parseNextObject(PosDataInputStream stream, List<FileCompone
* /BitsPerComponent 4
* /Length 347
* /Filter 8 0 R
* </pre> </p> When we found the '
* </pre> When we found the '
* <code>R</code>', we need to merge the former
* <code>8</code> and
* <code>0</code> together with the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public class Chunk_pHYs extends Chunk {
public final int AxisY;
/**
* Unit specifier.
* <p><pre>
* <pre>
* 0: unit is unknown
* 1: unit is the meter
* </pre></p>
* </pre>
*/
public final int Unit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ public class Chunk_tRNS extends Chunk {
* For color type 3 (indexed color), the <span>tRNS</span> chunk contains
* a series of one-byte alpha values, corresponding to entries in the
* <span>PLTE</span> chunk:
* </p>
* <pre>
* Alpha for palette index 0: 1 byte
* Alpha for palette index 1: 1 byte
* ...etc...
* </pre>
* </p>
* <p>
* Each entry indicates that pixels of the corresponding palette index must
* be treated as having the specified alpha value.
Expand Down
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@

# System default java on Ubuntu LTS Linux
export JAVA_HOME=/usr/lib/jvm/default-java
#export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64

# System default java on openSUSE Linux
#export JAVA_HOME=/usr/lib64/jvm/java

java -version

mvn clean package install
mvn javadoc:aggregate
mvn jdeps:jdkinternals
Expand Down
4 changes: 4 additions & 0 deletions format-class.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
# Build one format only
#


export JAVA_HOME=/usr/lib/jvm/default-java
#export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
java -version

mvn --projects CommonLib,FormatCLASS,BinaryInternalsViewer clean package install

cd BinaryInternalsViewer/target/
Expand Down
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@

<properties>
<maven.compiler.release>11</maven.compiler.release>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs.version>4.4.2</spotbugs.version>
<spotbugs.version>4.6.0</spotbugs.version><!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-annotations -->

<revision>3.5</revision>
</properties>
Expand All @@ -63,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.10.1</version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
Expand All @@ -75,12 +75,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.2</version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-checkstyle-plugin -->
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>9.0.1</version>
<version>10.2</version><!-- https://mvnrepository.com/artifact/com.puppycrawl.tools/checkstyle -->
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -109,7 +109,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.1.3</version>
<version>4.6.0.0</version><!-- https://mvnrepository.com/artifact/com.github.spotbugs/spotbugs-maven-plugin -->
<dependencies>
<dependency>
<groupId>com.github.spotbugs</groupId>
Expand Down Expand Up @@ -137,14 +137,14 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.0</version>
<configuration>
<additionalJOption>-J-Xmx4g </additionalJOption>
<additionalOptions>-html5</additionalOptions>
<aggregate>true</aggregate>
<detectJavaApiLink>true</detectJavaApiLink>
<detectLinks>true</detectLinks>
<footer>Free Internals</footer>
<doclint>all,-missing</doclint><!-- Ignore Javadoc warning as of now -->
<header>Free Internals &lt;br&gt; Free Tools to View Internals of Binary File</header>
<show>private</show>
<links>
Expand All @@ -163,7 +163,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.2.1</version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -178,13 +178,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
<version>3.12.0</version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-site-plugin -->
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<version>2.8.2</version><!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
<executions>
<execution>
<id>default-deploy</id>
Expand All @@ -200,7 +200,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<version>1.2.7</version><!-- https://mvnrepository.com/artifact/org.codehaus.mojo/flatten-maven-plugin -->
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
Expand Down Expand Up @@ -252,4 +252,4 @@
<!-- Libs on hold -->
<module>FormatPDF</module>
</modules>
</project>
</project>

0 comments on commit d60d552

Please sign in to comment.