| Summary: | Crash on importing Java 1.5 classes containing annotations | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | Meni Livne <livne> |
| Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | 1.5.2 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Example class causing crash on import | ||
|
Description
Meni Livne
2006-05-11 20:45:15 UTC
Created attachment 16030 [details]
Example class causing crash on import
SVN commit 541373 by okellogg:
parseStmt(): Skip annotations for now.
TODO: Investigate how to forward them to the model.
BUG:127160
M +1 -0 ChangeLog
M +6 -0 umbrello/javaimport.cpp
--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #541372:541373
@@ -14,6 +14,7 @@
* Crash loading xmi file (125331, 126968)
* User interaction with UMLWidget improvements (126391)
* Comments are cut short when generating PHP code (126480)
+* Crash on importing Java 1.5 classes containing annotations (127160)
Version 1.5.2
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/javaimport.cpp #541372:541373
@@ -259,6 +259,12 @@
skipStmt();
return true;
}
+ if (keyword == "@") { // annotation
+ advance();
+ if (m_source[m_srcIndex] == "(")
+ skipToClosing('(');
+ return true;
+ }
if (keyword == "}") {
if (m_scopeIndex)
m_klass = dynamic_cast<UMLClassifier*>(m_scope[--m_scopeIndex]);
SVN commit 541374 by okellogg:
parseStmt(): Skip normal annotations too.
CCBUG:127160
M +3 -1 javaimport.cpp
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/javaimport.cpp #541373:541374
@@ -261,8 +261,10 @@
}
if (keyword == "@") { // annotation
advance();
- if (m_source[m_srcIndex] == "(")
+ if (m_source[m_srcIndex + 1] == "(") {
+ advance();
skipToClosing('(');
+ }
return true;
}
if (keyword == "}") {
|