Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 446593

Summary: ClassCastException when opening tags for jgit repository
Product: [ECD] Orion Reporter: Matthias Sohn <matthias.sohn>
Component: GitAssignee: Matthias Sohn <matthias.sohn>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pwebster
Version: 7.0   
Target Milestone: 8.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Matthias Sohn CLA 2014-10-10 05:12:31 EDT
- clone https://git.eclipse.org/r/jgit/jgit
- open git page
- click drop-down to list git references
- select "tags"

Orion hits the following ClassCastException (stack trace is swallowed and doesn't end up iin server log):

Thread [Worker-1] (Suspended (exception ClassCastException))	
	Tag.parseCommit() line: 129	
	Tag.getTime() line: 194	
	Tag.access$0(Tag) line: 193	
	Tag$1.compare(Tag, Tag) line: 60	
	Tag$1.compare(Object, Object) line: 1	
	TimSort<T>.countRunAndMakeAscending(T[], int, int, Comparator<? super T>) line: 351	
	TimSort<T>.sort(T[], int, int, Comparator<? super T>, T[], int, int) line: 230	
	Arrays.sort(T[], int, int, Comparator<? super T>) line: 1512	
	ArrayList<E>.sort(Comparator<? super E>) line: 1454	
	Collections.sort(List<T>, Comparator<? super T>) line: 175	
	ListTagsJob.performJob() line: 144	
	ListTagsJob(TaskJob).performJob(IProgressMonitor) line: 100	
	ListTagsJob(TaskJob).run(IProgressMonitor) line: 118	
	Worker.run() line: 54	

The jgit git repository contains a tag "spearce-gpg-pub" which doesn't point to a RevCommit but directly to a RevBlob containing Shawn's public GPG key he uses for signing tags. This is allowed by git but Orion can't cope with that.
Comment 1 Matthias Sohn CLA 2014-10-10 05:21:48 EDT
proposed fix https://git.eclipse.org/r/#/c/34695/