Skip to content

Commit

Permalink
Merge pull request #172 from Kindrat/master
Browse files Browse the repository at this point in the history
Code reformat and checkstyle
  • Loading branch information
andreasrosdal authored Apr 2, 2019
2 parents 73ae93a + 791d549 commit defe441
Show file tree
Hide file tree
Showing 16 changed files with 817 additions and 759 deletions.
36 changes: 36 additions & 0 deletions checkstyle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">

<!--
Checkstyle configuration that checks the sun coding conventions from:
- the Java Language Specification at
https://docs.oracle.com/javase/specs/jls/se11/html/index.html
- the Sun Code Conventions at https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
- the Javadoc guidelines at
https://www.oracle.com/technetwork/java/javase/documentation/index-137868.html
- the JDK Api documentation https://docs.oracle.com/en/java/javase/11/
- some best practices
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sourceforge.net (or in your downloaded distribution).
Most Checks are configurable, be sure to consult the documentation.
To completely disable a check, just comment it out or delete it from the file.
Finally, it is worth reading the documentation.
-->

<module name="Checker">

<!--
If you set the basedir property below, then all reported file
names will be relative to the specified directory. See
https://checkstyle.org/5.x/config.html#Checker
<property name="basedir" value="${basedir}"/>
-->

<module name="TreeWalker">
<property name="cacheFile" value="target/cachefile"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
</module>
</module>
</module>
1 change: 0 additions & 1 deletion openpdf/src/main/java/com/lowagie/text/pdf/PdfStamper.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import java.io.OutputStream;
import java.security.SignatureException;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.lowagie.text.error_messages.MessageLocalization;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public SAXmyHtmlHandler(DocListener document, HashMap htmlTags) {
*
* @param uri
* the Uniform Resource Identifier
* @param lname
* @param localName
* the local name (without prefix), or the empty string if
* Namespace processing is not being performed.
* @param name
Expand All @@ -129,7 +129,7 @@ public SAXmyHtmlHandler(DocListener document, HashMap htmlTags) {
* the list of attributes
*/

public void startElement(String uri, String lname, String name,
public void startElement(String uri, String localName, String name,
Attributes attrs) {
// System.err.println("Start: " + name);

Expand Down Expand Up @@ -274,4 +274,4 @@ public void endElement(String uri, String lname, String name) {
// suggestion by Ken Auer
handleEndingTags(name);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@

import java.util.*;

import com.lowagie.text.pdf.PdfCell;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

/**
Expand Down Expand Up @@ -69,4 +68,4 @@ void testUnderlineAndStrikeThrough() throws Exception {
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

/**
Expand Down Expand Up @@ -72,4 +71,4 @@ void testHelloWorld() throws Exception {
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.awt.*;
import java.io.ByteArrayOutputStream;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotEquals;

/**
Expand Down
4 changes: 4 additions & 0 deletions pdf-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
<artifactId>openpdf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit defe441

Please sign in to comment.