Skip to content

Commit 1c4871d

Browse files
authored
Merge pull request #1088 from m1ngyuan/polish
Polishing
2 parents 66e1044 + d3a105f commit 1c4871d

3 files changed

Lines changed: 4 additions & 9 deletions

File tree

src/main/java/org/htmlunit/css/CssPixelValueConverter.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ else if (value.endsWith("pc")) {
117117
else if (value.endsWith("ch")) {
118118
i = i * 8;
119119
}
120-
else if (value.endsWith("ch")) {
121-
i = i * 8;
122-
}
123120
else if (value.endsWith("vh")
124121
|| value.endsWith("vmin")) {
125122
// this matches also

src/main/java/org/htmlunit/javascript/host/html/HTMLTableCellElement.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public int getOffsetWidth() {
8888
if ("collapse".equals(style.getStyleAttribute(StyleAttributes.Definition.BORDER_COLLAPSE, true))) {
8989
final HtmlTableRow row = getRow();
9090
if (row != null) {
91-
w -= 0.5 * style.getBorderLeftValue();
92-
w -= 0.5 * style.getBorderRightValue();
91+
w -= 0.5f * style.getBorderLeftValue();
92+
w -= 0.5f * style.getBorderRightValue();
9393
}
9494
}
9595

src/main/java/org/htmlunit/platform/image/ImageIOImageData.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@ protected void finalize() throws Throwable {
100100
@SuppressWarnings("PMD.UnusedLocalVariable")
101101
public void close() throws IOException {
102102
if (imageReader_ != null) {
103-
try {
104-
try (ImageInputStream stream = (ImageInputStream) imageReader_.getInput()) {
105-
// nothing
106-
}
103+
try (ImageInputStream stream = (ImageInputStream) imageReader_.getInput()) {
104+
// nothing
107105
}
108106
finally {
109107
imageReader_.setInput(null);

0 commit comments

Comments
 (0)