[Uml-devel] KDE/kdesdk/umbrello/umbrello/codeimport

Andi Fischer andi.fischer at hispeed.ch
Tue Sep 7 20:46:10 UTC 2010


SVN commit 1172689 by fischer:

Krazy issue fixed. More debug info added.

 M  +9 -2      javaimport.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/javaimport.cpp #1172688:1172689
@@ -465,7 +465,8 @@
     // of an operation.) Up next is the name of the attribute
     // or operation.
     if (! keyword.contains( QRegExp("^\\w") )) {
-        uError() << "importJava: ignoring " << keyword;
+        uError() << "importJava: ignoring " << keyword <<
+            " at " << m_srcIndex << ", " << m_source.count() << " in " << m_klass->name();
         return false;
     }
     QString typeName = m_source[m_srcIndex];
@@ -561,7 +562,7 @@
                 name += nextToken;  // add possible array dimensions to `name'
             }
             nextToken = advance();
-            if (nextToken == QString()) {
+            if (nextToken.isEmpty()) {
                 break;
             }
         }
@@ -586,10 +587,16 @@
     }
     // reset visibility to default
     m_currentAccess = m_defaultCurrentAccess;
+    if (m_srcIndex < m_source.count()) {
     if (m_source[m_srcIndex] != ";") {
         uError() << "importJava: ignoring trailing items at " << name;
         skipStmt();
     }
+    }
+    else {
+        uError() << "index out of range: ignoring statement " << name;
+        skipStmt();
+    }
     return true;
 }
 




More information about the umbrello-devel mailing list