@Override
	public void endElement(String uri, String localName, String qName) throws SAXException {
		if(localName.equals(TAG_LOG_ENTRY)) {
			if (currentTags.revision == 0) {
				throw new IllegalStateException(
						"Expected to have tag 'revision' for svn-logentry in the XML, but did not find it in: " + currentTags);
			}

			if(runnable != null) {
				runnable.run(currentTags);
			} else {
				configs.put(currentTags.revision, currentTags);
			}
			currentTags = null;
		} else {
			String value = characters.toString().trim();
			switch (localName) {
				case TAG_AUTHOR:
					currentTags.author = value.toLowerCase();
					break;
				case TAG_DATE:
					currentTags.date = value;
					break;
				case TAG_MSG:
					currentTags.msg = value;
					break;
				case TAG_PATH:
					// remove the initial branchname to reduce screen and memory size of the paths
					for (String branch : branches) {
						value = StringUtils.removeStart(value, branch);
					}

					// only store a few paths to not go OOM with too many paths stored
					int size = currentTags.paths == null ? 0 : currentTags.paths.size();
					if (size == pathLimit) {
						currentTags.addPath(LogEntry.MORE, "");
					} else if (size < pathLimit) {
						currentTags.addPath(value, lastAction);
					}
					lastAction = "";
					break;
			}
			characters.setLength(0);
		}
	}
@ Override public void endElement ( String uri , String localName , String qName ) throws SAXException { if ( localName . equals ( TAG_LOG_ENTRY ) ) { if ( currentTags . revision == 0 ) { throw new IllegalStateException ( "Expected to have tag 'revision' for svn-logentry in the XML, but did not find it in: " + currentTags ) ; } if ( runnable != null ) { runnable . run ( currentTags ) ; } else { configs . put ( currentTags . revision , currentTags ) ; } currentTags = null ; } else { String value = characters . toString ( ) . trim ( ) ; switch ( localName ) { case TAG_AUTHOR : currentTags . author = value . toLowerCase ( ) ; break ; case TAG_DATE : currentTags . date = value ; break ; case TAG_MSG : currentTags . msg = value ; break ; case TAG_PATH : for ( String branch : branches ) { value = StringUtils . removeStart ( value , branch ) ; } int size = currentTags . paths == null ? 0 : currentTags . paths . size ( ) ; if ( size == pathLimit ) { currentTags . addPath ( LogEntry . MORE , "" ) ; } else if ( size < pathLimit ) { currentTags . addPath ( value , lastAction ) ; } lastAction = "" ; break ; } characters . setLength ( 0 ) ; } }
Internal method used for XML parsing