You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2021/05/12 21:32:22 UTC
[commons-imaging] branch master updated (ade7a90 -> 678ffcc)
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git.
from ade7a90 Merge branch 'pr-149'
new d06135a [IMAGING-303] Simplify If-else conditions
new acd842b [IMAGING-303] Changelog
new 678ffcc Merge branch 'pr-148'
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/changes/changes.xml | 3 +++
.../apache/commons/imaging/formats/tiff/TiffDirectory.java | 12 ++----------
.../apache/commons/imaging/formats/xpm/XpmImageParser.java | 5 +----
3 files changed, 6 insertions(+), 14 deletions(-)
[commons-imaging] 03/03: Merge branch 'pr-148'
Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit 678ffcc332ffe3c742a8f5184b268121387272e8
Merge: ade7a90 acd842b
Author: Bruno P. Kinoshita <ki...@apache.org>
AuthorDate: Thu May 13 09:31:59 2021 +1200
Merge branch 'pr-148'
This closes #148
src/changes/changes.xml | 3 +++
.../apache/commons/imaging/formats/tiff/TiffDirectory.java | 12 ++----------
.../apache/commons/imaging/formats/xpm/XpmImageParser.java | 5 +----
3 files changed, 6 insertions(+), 14 deletions(-)
[commons-imaging] 01/03: [IMAGING-303] Simplify If-else conditions
Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit d06135a1ae3eda4a50f234c056f82381f41ac0c9
Author: Arturo Bernal <ar...@gmail.com>
AuthorDate: Wed May 12 22:11:44 2021 +0200
[IMAGING-303] Simplify If-else conditions
---
.../apache/commons/imaging/formats/tiff/TiffDirectory.java | 12 ++----------
.../apache/commons/imaging/formats/xpm/XpmImageParser.java | 5 +----
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
index 52423c1..ba9407a 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java
@@ -147,11 +147,7 @@ public class TiffDirectory extends TiffElement {
}
public boolean hasJpegImageData() throws ImageReadException {
- if (null != findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT)) {
- return true;
- }
-
- return false;
+ return null != findField(TiffTagConstants.TIFF_TAG_JPEG_INTERCHANGE_FORMAT);
}
public boolean hasTiffImageData() throws ImageReadException {
@@ -159,11 +155,7 @@ public class TiffDirectory extends TiffElement {
return true;
}
- if (null != findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS)) {
- return true;
- }
-
- return false;
+ return null != findField(TiffTagConstants.TIFF_TAG_STRIP_OFFSETS);
}
/**
diff --git a/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java b/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
index fc39bdf..43006be 100644
--- a/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
@@ -660,10 +660,7 @@ public class XpmImageParser extends ImageParser {
}
final PaletteFactory paletteFactory = new PaletteFactory();
- boolean hasTransparency = false;
- if (paletteFactory.hasTransparency(src, 1)) {
- hasTransparency = true;
- }
+ final boolean hasTransparency = paletteFactory.hasTransparency(src, 1);
SimplePalette palette = null;
int maxColors = WRITE_PALETTE.length;
int charsPerPixel = 1;
[commons-imaging] 02/03: [IMAGING-303] Changelog
Posted by ki...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kinow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit acd842b4f195cfecbeced3d551c8e15070ee4184
Author: Bruno P. Kinoshita <ki...@apache.org>
AuthorDate: Thu May 13 09:31:51 2021 +1200
[IMAGING-303] Changelog
---
src/changes/changes.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 249ffab..f637367 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -135,6 +135,9 @@ The <action> type attribute can be add,update,fix,remove.
<action issue="IMAGING-304" dev="kinow" type="update" due-to="Arturo Bernal">
Use Comparator combinator
</action>
+ <action issue="IMAGING-303" dev="kinow" type="update" due-to="Arturo Bernal">
+ Simplify If-else conditions
+ </action>
</release>
<release version="1.0-alpha2" date="2020-08-01" description="Second 1.0 alpha release">
<action issue="IMAGING-258" dev="kinow" type="update" due-to="Gary Lucas">