public void endElement()

in src/main/java/org/apache/maven/plugins/changelog/ChangeLogHandler.java [84:131]


    public void endElement(String uri, String localName, String qName) throws SAXException {
        if ("changeset".equals(qName)) {
            changeSets.add(bufSet);
        }

        if ("changelog-entry".equals(qName)) {
            bufEntries.add(bufEntry);
        }

        if ("file".equals(qName)) {
            bufEntry.addFile(bufFile);
        } else if ("date".equals(qName)) {
            try {
                long ms = 0;
                if (bufEntry.getDate() != null) {
                    ms = bufEntry.getDate().getTime();
                }
                bufEntry.setDate(new Date(
                        ms + new SimpleDateFormat(currentPattern).parse(bufData).getTime()));
            } catch (ParseException e) {
                throw new SAXException(e);
            }
        } else if ("time".equals(qName)) {
            try {
                long ms = 0;
                if (bufEntry.getDate() != null) {
                    ms = bufEntry.getDate().getTime();
                }
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat(currentPattern);
                // MCHANGELOG-68 Adjust for time zone when parsing the time
                simpleDateFormat.setTimeZone(TIMEZONE);
                // Adjust for time zone when adding up the milliseconds
                bufEntry.setDate(new Date(ms + simpleDateFormat.parse(bufData).getTime() + TIMEZONE.getRawOffset()));
            } catch (ParseException e) {
                throw new SAXException(e);
            }
        } else if ("author".equals(qName)) {
            bufEntry.setAuthor(bufData);
        } else if ("msg".equals(qName)) {
            bufEntry.setComment(bufData);
        }

        if ("revision".equals(qName)) {
            bufFile.setRevision(bufData);
        } else if ("name".equals(qName)) {
            bufFile.setName(nameRegex.matcher(bufData).replaceFirst(""));
        }
    }