Version: 1.5.3 (using KDE KDE 3.5.3) Installed from: Fedora RPMs Compiler: gcc 4.1.1 OS: Linux I have patched my version of the source to include the changes in 1.5.4 for java import issues. However, if you import this code umbrello will crash: public class TestClass { public TestClass getInstance () { return instance; } private TestClass() { } public void SomeMethod() { } String aString; String anotherString; TestClass instance = new TestClass(); } I debugged the crash, and it can be prevented with this change: @@ -286,7 +286,7 @@ } QString typeName = joinTypename(); QString name; - if ( (typeName == m_klass->getName())) { + if ((m_klass != NULL) && (typeName == m_klass->getName())) { // Constructor. name = typeName; typeName = QString::null; If this is done, the import still doesn't work because the importer gets confused over the getInstance method and instance member. This appears to be because the class is referencing instances of itself.
SVN commit 562838 by okellogg: parseStmt(): Check for m_klass being NULL before dereferencing it. Thanks to Clinton Grant for spotting this. CCBUG:130735 M +1 -1 javaimport.cpp --- branches/KDE/3.5/kdesdk/umbrello/umbrello/javaimport.cpp #562837:562838 @@ -286,7 +286,7 @@ } QString typeName = joinTypename(); QString name; - if (typeName == m_klass->getName()) { + if (m_klass != NULL && typeName == m_klass->getName()) { // Constructor. name = typeName; typeName = QString::null;
Works for me now, probably due to commit 562848 (see bug 130792)