Bug 386742 - Wrong namespace assignment of imported base classes with java class import
Summary: Wrong namespace assignment of imported base classes with java class import
Status: ASSIGNED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.23.2 (KDE Applications 17.08.2)
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-11 10:48 UTC by Ralf Habacker
Modified: 2017-11-12 14:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
test case (127 bytes, text/x-java)
2017-11-11 10:48 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2017-11-11 10:48:17 UTC
Created attachment 108784 [details]
test case

Importing of the following code fragment places class "BaseClass" in the wrong namespace


How to reproduce:
2. start umbrello
3. select java language
4. import appended test file

What happens:
Inspecting the tree view shows that the class "BaseClass" is located in the top level namespace

What is expected ?
Class "BaseClass" should be located in the namespace "org.kde"
Comment 1 Ralf Habacker 2017-11-11 16:52:24 UTC
Git commit 2e290f0afa8da03bb6b3037759640dbebed5e92e by Ralf Habacker.
Committed on 11/11/2017 at 16:47.
Pushed by habacker into branch 'master'.

Fix 'Wrong namespace assignment of imported base classes with java class import'

In case a referenced base class specified by an import statement is not
found in the file system, use the namespace from the import statement
to avoid placing it in the top level name space.

A java test file is added.
FIXED-IN:2.23.80 (KDE Applications 17.11.80)

A  +7    -0    test/import/java/apackage/DerivedExtern.java
M  +27   -0    umbrello/codeimport/javaimport.cpp

https://commits.kde.org/umbrello/2e290f0afa8da03bb6b3037759640dbebed5e92e
Comment 2 Ralf Habacker 2017-11-11 16:52:24 UTC
Git commit 632759a08198feb39dfc9c22c1e46ff1d82b12fe by Ralf Habacker.
Committed on 11/11/2017 at 16:47.
Pushed by habacker into branch 'master'.

Fix to avoid adding an empty class as return type of the created base class.

M  +7    -5    umbrello/codeimport/javaimport.cpp

https://commits.kde.org/umbrello/632759a08198feb39dfc9c22c1e46ff1d82b12fe