Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 145 additions & 7 deletions openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,159 @@

private PdfBatchUtils() {}

// ------------------------- Common job records -------------------------
// ------------------------- Common job classes -------------------------

/** Merge several PDFs into one. */
public record MergeJob(List<Path> inputs, Path output) {}
public static final class MergeJob {
public final List<Path> inputs;
public final Path output;

public MergeJob(List<Path> inputs, Path output) {
this.inputs = inputs;
this.output = output;
}

public List<Path> inputs() { return inputs; }
public Path output() { return output; }

Check notice on line 92 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L92

'METHOD_DEF' should be separated from previous line.

Check notice on line 92 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L92

'{' at column 30 should have line break after.

@Override
public boolean equals(Object o) {
if (this == o) return true;

Check notice on line 96 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L96

'if' construct must use '{}'s.
if (!(o instanceof MergeJob that)) return false;
return Objects.equals(inputs, that.inputs) && Objects.equals(output, that.output);
}

@Override
public int hashCode() { return Objects.hash(inputs, output); }

Check notice on line 102 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L102

'{' at column 31 should have line break after.

Check notice on line 102 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L102

'}' at column 70 should be alone on a line.

@Override
public String toString() { return "MergeJob[inputs=" + inputs + ", output=" + output + "]"; }

Check failure on line 105 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal ", output=" 3 times.

See more on https://sonarcloud.io/project/issues?id=LibrePDF_OpenPDF&issues=AZzmKhzVcN6OHpU46VTK&open=AZzmKhzVcN6OHpU46VTK&pullRequest=1513

Check notice on line 105 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L105

'{' at column 34 should have line break after.
}

/** Add a semi-transparent text watermark to all pages. */
public record WatermarkJob(Path input, Path output, String text, float fontSize, float opacity) {}
public static final class WatermarkJob {
public final Path input;
public final Path output;
public final String text;
public final float fontSize;
public final float opacity;

public WatermarkJob(Path input, Path output, String text, float fontSize, float opacity) {
this.input = input;
this.output = output;
this.text = text;
this.fontSize = fontSize;
this.opacity = opacity;
}

public Path input() { return input; }

Check notice on line 124 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L124

'}' at column 45 should be alone on a line.
public Path output() { return output; }
public String text() { return text; }
public float fontSize() { return fontSize; }
public float opacity() { return opacity; }

Check notice on line 128 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L128

'}' at column 50 should be alone on a line.

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof WatermarkJob that)) return false;

Check notice on line 133 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L133

'if' construct must use '{}'s.
return Float.compare(fontSize, that.fontSize) == 0
&& Float.compare(opacity, that.opacity) == 0
&& Objects.equals(input, that.input)
&& Objects.equals(output, that.output)
&& Objects.equals(text, that.text);
}

@Override
public int hashCode() { return Objects.hash(input, output, text, fontSize, opacity); }

Check notice on line 142 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L142

'{' at column 31 should have line break after.

Check notice on line 142 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L142

'}' at column 94 should be alone on a line.

@Override
public String toString() {
return "WatermarkJob[input=" + input + ", output=" + output + ", text=" + text
+ ", fontSize=" + fontSize + ", opacity=" + opacity + "]";
}
}

/** Encrypt a PDF with given passwords and permissions. */
public record EncryptJob(Path input, Path output,
String userPassword, String ownerPassword,
int permissions, int encryptionType) {}
public static final class EncryptJob {
public final Path input;
public final Path output;
public final String userPassword;
public final String ownerPassword;
public final int permissions;
public final int encryptionType;

public EncryptJob(Path input, Path output,
String userPassword, String ownerPassword,
int permissions, int encryptionType) {
this.input = input;
this.output = output;
this.userPassword = userPassword;
this.ownerPassword = ownerPassword;
this.permissions = permissions;
this.encryptionType = encryptionType;
}

public Path input() { return input; }
public Path output() { return output; }
public String userPassword() { return userPassword; }

Check notice on line 173 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L173

'METHOD_DEF' should be separated from previous line.

Check notice on line 173 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L173

'{' at column 38 should have line break after.
public String ownerPassword() { return ownerPassword; }

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L174

'METHOD_DEF' should be separated from previous line.

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L174

'{' at column 39 should have line break after.

Check notice on line 174 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L174

'}' at column 63 should be alone on a line.
public int permissions() { return permissions; }

Check notice on line 175 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L175

'{' at column 34 should have line break after.
public int encryptionType() { return encryptionType; }

Check notice on line 176 in openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-core/src/main/java/org/openpdf/text/pdf/PdfBatchUtils.java#L176

'{' at column 37 should have line break after.

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof EncryptJob that)) return false;
return permissions == that.permissions && encryptionType == that.encryptionType
&& Objects.equals(input, that.input) && Objects.equals(output, that.output)
&& Objects.equals(userPassword, that.userPassword)
&& Objects.equals(ownerPassword, that.ownerPassword);
}

@Override
public int hashCode() {
return Objects.hash(input, output, userPassword, ownerPassword, permissions, encryptionType);
}

@Override
public String toString() {
return "EncryptJob[input=" + input + ", output=" + output + ", permissions=" + permissions
+ ", encryptionType=" + encryptionType + "]";
}
}

/** Split one PDF into per-page PDFs in the given directory (files will be named baseName_pageX.pdf). */
public record SplitJob(Path input, Path outputDir, String baseName) {}
public static final class SplitJob {
public final Path input;
public final Path outputDir;
public final String baseName;

public SplitJob(Path input, Path outputDir, String baseName) {
this.input = input;
this.outputDir = outputDir;
this.baseName = baseName;
}

public Path input() { return input; }
public Path outputDir() { return outputDir; }
public String baseName() { return baseName; }

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof SplitJob that)) return false;
return Objects.equals(input, that.input) && Objects.equals(outputDir, that.outputDir)
&& Objects.equals(baseName, that.baseName);
}

@Override
public int hashCode() { return Objects.hash(input, outputDir, baseName); }

@Override
public String toString() {
return "SplitJob[input=" + input + ", outputDir=" + outputDir + ", baseName=" + baseName + "]";
}
}


// ------------------------- Merge -------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ protected void processContent(byte[] contentBytes, PdfDictionary resources) {
PdfContentParser pdfContentParser = new PdfContentParser(new PRTokeniser(contentBytes));
List<PdfObject> operands = new ArrayList<>();
while (!pdfContentParser.parse(operands).isEmpty()) {
PdfLiteral operator = (PdfLiteral) operands.getLast();
PdfLiteral operator = (PdfLiteral) operands.get(operands.size() - 1);
invokeOperator(operator, operands, resources);
}
} catch (Exception e) {
Expand Down Expand Up @@ -971,7 +971,7 @@ public String getOperatorName() {

@Override
public void invoke(List<PdfObject> operands, PdfContentStreamHandler handler, PdfDictionary resources) {
PdfObject firstOperand = operands.getFirst();
PdfObject firstOperand = operands.get(0);
if (firstOperand instanceof PdfName) {
PdfName name = (PdfName) firstOperand;
PdfDictionary dictionary = resources.getAsDict(PdfName.XOBJECT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public void processContent(byte[] contentBytes, PdfDictionary resources,
PdfContentParser ps = new PdfContentParser(new PRTokeniser(contentBytes));
List<PdfObject> operands = new ArrayList<>();
while (!ps.parse(operands).isEmpty()) {
PdfLiteral operator = (PdfLiteral) operands.getLast();
PdfLiteral operator = (PdfLiteral) operands.get(operands.size() - 1);
handler.invokeOperator(operator, operands, resources);
}
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.function.Consumer;

/**
* Utility class for executing collections of tasks concurrently using Java 21 virtual threads.
* Utility class for executing collections of tasks concurrently using a cached thread pool.
*/
public final class PdfBatch {
private PdfBatch() {}
Expand All @@ -35,7 +35,8 @@ public static <T> BatchResult<T> run(Collection<? extends Callable<T>> tasks,
var result = new BatchResult<T>();
if (tasks.isEmpty()) return result;

try (ExecutorService exec = Executors.newVirtualThreadPerTaskExecutor()) {
ExecutorService exec = Executors.newCachedThreadPool();
try {
List<Future<T>> futures = tasks.stream().map(exec::submit).toList();
for (Future<T> f : futures) {
try {
Expand All @@ -52,6 +53,8 @@ public static <T> BatchResult<T> run(Collection<? extends Callable<T>> tasks,
if (onFailure != null) onFailure.accept(ie);
}
}
} finally {
exec.shutdown();
}
return result;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import static org.junit.jupiter.api.Assertions.*;

/**
* Tests for PdfBatchUtils to ensure it runs batch jobs on virtual threads.
* Tests for PdfBatchUtils to ensure it runs batch jobs concurrently.
*/
class PdfBatchUtilsTest {

Expand All @@ -33,21 +33,11 @@ private static Path tinyPdf(String prefix) throws Exception {


@Test
void runBatch_usesVirtualThreads() {
// We don't create any executors here; runBatch does that internally.
void runBatch_executesConcurrently() {
var tasks = List.of(
(Callable<Integer>) () -> {
assertTrue(Thread.currentThread().isVirtual(), "Task should run on a virtual thread");
return 1;
},
(Callable<Integer>) () -> {
assertTrue(Thread.currentThread().isVirtual(), "Task should run on a virtual thread");
return 2;
},
(Callable<Integer>) () -> {
assertTrue(Thread.currentThread().isVirtual(), "Task should run on a virtual thread");
return 3;
}
(Callable<Integer>) () -> 1,
(Callable<Integer>) () -> 2,
(Callable<Integer>) () -> 3
);

var result = PdfBatch.run(tasks, v -> {}, t -> fail(t));
Expand All @@ -57,7 +47,7 @@ void runBatch_usesVirtualThreads() {
}

@Test
void batchMerge_createsOutput_and_runsOnVirtualThreads() throws Exception {
void batchMerge_createsOutput() throws Exception {
// Prepare inputs
Path a = tinyPdf("a-");
Path b = tinyPdf("b-");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeTrue;

import org.openpdf.text.DocumentException;

Check warning on line 8 in openpdf-core/src/test/java/org/openpdf/text/pdf/fonts/FontTest.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this unused import 'org.openpdf.text.DocumentException'.

See more on https://sonarcloud.io/project/issues?id=LibrePDF_OpenPDF&issues=AZzmKhylcN6OHpU46VTJ&open=AZzmKhylcN6OHpU46VTJ&pullRequest=1513
import org.openpdf.text.Font;
import org.openpdf.text.FontFactory;
import java.util.HashMap;
Expand Down Expand Up @@ -84,7 +86,14 @@
@ParameterizedTest(name = "Style {0}")
@MethodSource("getStyles")
void testFontStyleOfStyledFont(int style) {
final Font font = FontFactory.getFont(FONT_NAME_WITH_STYLES, DEFAULT_FONT_SIZE, style);
final Font font;
try {
font = FontFactory.getFont(FONT_NAME_WITH_STYLES, DEFAULT_FONT_SIZE, style);
} catch (Exception e) {
// On some platforms (e.g. macOS) the system Courier font may lack the OS/2 table
assumeTrue(false, "System Courier font not usable on this platform: " + e.getMessage());
return;
}

// For the font Courier, there is no Courier-Underline or Courier-Strikethrough font available.
if (style == Font.UNDERLINE || style == Font.STRIKETHRU) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1863,6 +1863,22 @@
return FS_ID;
}

public record CSSSideProperties(CSSName top, CSSName right, CSSName bottom, CSSName left) {
public static final class CSSSideProperties {

Check warning on line 1866 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this class declaration to use 'record CSSSideProperties(CSSName top, CSSName right, CSSName bottom, CSS...)'.

See more on https://sonarcloud.io/project/issues?id=LibrePDF_OpenPDF&issues=AZzmKhxUcN6OHpU46VTH&open=AZzmKhxUcN6OHpU46VTH&pullRequest=1513
private final CSSName top;
private final CSSName right;
private final CSSName bottom;
private final CSSName left;

public CSSSideProperties(CSSName top, CSSName right, CSSName bottom, CSSName left) {
this.top = top;
this.right = right;
this.bottom = bottom;
this.left = left;
}

public CSSName top() { return top; }

Check notice on line 1879 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java#L1879

'{' at column 30 should have line break after.
public CSSName right() { return right; }
public CSSName bottom() { return bottom; }

Check notice on line 1881 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java#L1881

'METHOD_DEF' should be separated from previous line.
public CSSName left() { return left; }

Check notice on line 1882 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java#L1882

'METHOD_DEF' should be separated from previous line.

Check notice on line 1882 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java#L1882

'{' at column 31 should have line break after.

Check notice on line 1882 in openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/constants/CSSName.java#L1882

'}' at column 46 should be alone on a line.
}
}
39 changes: 34 additions & 5 deletions openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
package org.openpdf.css.parser;

public record HSBColor(
float hue,
float saturation,
float brightness
) {
import java.util.Objects;

public final class HSBColor {

Check warning on line 5 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this class declaration to use 'record HSBColor(float hue, float saturation, float brightness)'.

See more on https://sonarcloud.io/project/issues?id=LibrePDF_OpenPDF&issues=AZzmKhw3cN6OHpU46VTG&open=AZzmKhw3cN6OHpU46VTG&pullRequest=1513
private final float hue;
private final float saturation;
private final float brightness;

public HSBColor(float hue, float saturation, float brightness) {
this.hue = hue;
this.saturation = saturation;
this.brightness = brightness;
}

public float hue() { return hue; }

Check notice on line 16 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L16

'{' at column 24 should have line break after.

Check notice on line 16 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L16

'}' at column 38 should be alone on a line.
public float saturation() { return saturation; }

Check notice on line 17 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L17

'METHOD_DEF' should be separated from previous line.

Check notice on line 17 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L17

'{' at column 31 should have line break after.
public float brightness() { return brightness; }

Check notice on line 18 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L18

'METHOD_DEF' should be separated from previous line.

@Override
public boolean equals(Object o) {
if (this == o) return true;

Check notice on line 22 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L22

'if' construct must use '{}'s.
if (!(o instanceof HSBColor that)) return false;

Check notice on line 23 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L23

'if' construct must use '{}'s.
return Float.compare(hue, that.hue) == 0
&& Float.compare(saturation, that.saturation) == 0
&& Float.compare(brightness, that.brightness) == 0;
}

@Override
public int hashCode() { return Objects.hash(hue, saturation, brightness); }

Check notice on line 30 in openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/parser/HSBColor.java#L30

'{' at column 27 should have line break after.

@Override
public String toString() {
return "HSBColor[hue=" + hue + ", saturation=" + saturation + ", brightness=" + brightness + "]";
}

// Taken from java.awt.Color to avoid dependency on it
public FSRGBColor toRGB() {
int r = 0, g = 0, b = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@

public static final BorderRadiusCorner UNDEFINED = new BorderRadiusCorner(0, 0);

private record Length(float value, boolean percent) {}
private static final class Length {
final float value;
final boolean percent;

Length(float value, boolean percent) {
this.value = value;
this.percent = percent;
}

float value() { return value; }
boolean percent() { return percent; }

Check notice on line 28 in openpdf-html/src/main/java/org/openpdf/css/style/BorderRadiusCorner.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/style/BorderRadiusCorner.java#L28

'METHOD_DEF' should be separated from previous line.

Check notice on line 28 in openpdf-html/src/main/java/org/openpdf/css/style/BorderRadiusCorner.java

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

openpdf-html/src/main/java/org/openpdf/css/style/BorderRadiusCorner.java#L28

'{' at column 27 should have line break after.
}

private final Length _left;
private final Length _right;
Expand Down
Loading