You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2021/05/05 18:51:58 UTC
svn commit: r1889533 -
/pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java
Author: tilman
Date: Wed May 5 18:51:58 2021
New Revision: 1889533
URL: http://svn.apache.org/viewvc?rev=1889533&view=rev
Log:
PDFBOX-4892: remove unnecessary check and initialisation, as suggested by valerybokov
Modified:
pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java
Modified: pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java?rev=1889533&r1=1889532&r2=1889533&view=diff
==============================================================================
--- pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java (original)
+++ pdfbox/branches/2.0/xmpbox/src/main/java/org/apache/xmpbox/DateConverter.java Wed May 5 18:51:58 2021
@@ -133,16 +133,9 @@ public final class DateConverter
int timeZonePos = 12;
if (date.length() - 12 > 5 || (date.length() - 12 == 3 && date.endsWith("Z")))
{
- if (date.length() >= 14)
- {
- second = Integer.parseInt(date.substring(12, 14));
- }
+ second = Integer.parseInt(date.substring(12, 14));
timeZonePos = 14;
}
- else
- {
- second = 0;
- }
if (date.length() >= (timeZonePos + 1))
{