Bug 150179

Summary: Java code import incorrectly imports classes with duplicate package name in package structure
Product: [Applications] umbrello Reporter: Phillip Merensky <phillip.sky>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal CC: okellogg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: bug150179-javaclasses-in-packagepath-containing-repeated-identifier.tgz

Description Phillip Merensky 2007-09-25 11:15:05 UTC
Version:           1.5.7 (using KDE 3.5.7, Gentoo)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.20-suspend2-r6

Lets say you have the following valid package structure in java:
testproject.images.gallery.face.gallery

If you try to import classes from this structure, classes in the deepest "gallery" package will be put in a new but wrong subtree of "images". You can put them manually below the deepest "gallery" package but the deletion of the wrong "gallery"-subtree will fail with "package must be empty" even if the deepest package selected in the subtree has no children. 

It seems that the two subtrees of images in the GUI work with the same data structure and the wrong subtree cannot be deleted because the correct subtree contains child nodes.

Regards and thanks for the great tool
Phillip Merensky
Comment 1 Andrew Crouthamel 2018-11-02 04:27:19 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 2 Andrew Crouthamel 2018-11-16 02:39:29 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 3 Oliver Kellogg 2022-02-15 15:30:11 UTC
Created attachment 146773 [details]
bug150179-javaclasses-in-packagepath-containing-repeated-identifier.tgz

I made the attached testcase (bug150179-javaclasses-in-packagepath-containing-repeated-identifier.tgz) with two Java classes.
Java import of the testcase works without problem.
Comment 4 Oliver Kellogg 2022-02-15 15:35:32 UTC
Looking through the commit history of
https://invent.kde.org/sdk/umbrello/-/blob/master/umbrello/codeimport/javaimport.cpp
I conclude that the bug has been fixed years ago.