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

Bug 344183

Summary: Long numeric artifact names produce an exception and make branch non-usable
Product: [Technology] OSEE Reporter: md Mising name <mdcontact>
Component: OSEE Application FrameworkAssignee: Ryan Brooks <ryan.d.brooks>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ryan.d.brooks
Version: unspecified   
Target Milestone: 0.9.8   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Patch containing bug fix from MD ryan.d.brooks: iplog+

Description md Mising name CLA 2011-04-28 15:06:42 EDT
Build Identifier: eclipse -M20110210-1200, osee 0.9.8 SR2

If more then one artifact or folder names contain only digits and are longer then 20 characters(may be less), then due to InvalidNumberFormat exception in ArtifactNameComparator.java the branch can not be rendered in artifact explorer tree anymore.  

Reproducible: Always

Steps to Reproduce:
1. Use demo setup and database and start system
2. on any branch rename any  two folders in artifact explorer to  long numeric    only names ,
   for example "Validation Tests" to "99999999999999999999" and 
   "Verification Tests" to "888888888888888888888".
3. switch to another branch and back 
4. the branch with renamed folders do not render properly and exception occurs.
Comment 1 md Mising name CLA 2011-04-28 15:22:31 EDT
Created attachment 194309 [details]
Proposed fix
Comment 2 md Mising name CLA 2011-04-28 15:25:31 EDT
in attachment there is proposed fix -
use Long if names are less then 19 characters and string compare otherwise.
Works fine for me.
Comment 3 Ryan Brooks CLA 2011-05-19 12:41:21 EDT
Created attachment 196135 [details]
Patch containing bug fix from MD
Comment 4 Ryan Brooks CLA 2011-05-19 12:45:53 EDT
MD,

Thanks for finding and fixing this bug.  I have created a patch file from your original Java file so it can be applied in the usual way.  Since this is a bug fix, I'll apply it to our next service release of 0.9.8 which is SR3.

If you don't mind providing your name, then I can provide the correct author when I apply the patch in Git.

Thanks,
Ryan
Comment 5 Ryan Brooks CLA 2011-08-16 20:25:22 EDT
Ryan Brooks applied this patch to 0.9.8_SR3 in the commit:
bug[bgz_344183]: Fix ArtifactNameComparator to handle long numeric names