Crash when reusing from unsaved aspect
The following exception occurs when reusing a concern from an unsaved aspect (due to the recent changes/improvements) when selecting the concern:
java.lang.NullPointerException
at ca.mcgill.sel.ram.ui.components.browser.CoreFileBrowser$1.fileSelected(CoreFileBrowser.java:54)
at ca.mcgill.sel.ram.ui.components.browser.RamFileBrowser.openFile(RamFileBrowser.java:822)
at ca.mcgill.sel.ram.ui.components.browser.RamFileBrowser.fileItemDoubleTapped(RamFileBrowser.java:659)
at ca.mcgill.sel.ram.ui.components.browser.RamFileBrowser.access$1(RamFileBrowser.java:648)
at ca.mcgill.sel.ram.ui.components.browser.RamFileBrowser$FileItem$TapHandler.processTapEvent(RamFileBrowser.java:1004)
Comments (8)
-
-
reporter I don't think that's necessary. The concern is already saved, that should be enough.
-
- changed status to resolved
Resolves
#404: Get URI from concern instead of aspect→ <<cset ec0077f12ba6>>
-
References
#404: fix issue on Windows systems caused by URI.path() returning null→ <<cset b31fd1dfd88a>>
-
Sorry to bump.
The changes seem to cause issues on Windows-based systems (I think only Windows).
In
COREModelUtil.getLocalConcern(..)
,reusedConcernURI.path()
returns null. From what I understand it's because on Windows URIs start with c:\Users.. and not \c\Users... and emf's URI doesn't recognize this as a hierarchical URI and so path() returns null.I made a quick fix on my branch Weaver-Reexpose (changes made both in core and ram repo). I'm not sure if it's the best way to do it and if it works on Mac, that's why I did not push directly on master.
Commits:
-
reporter No problem.
If I understand this right, instead of
createURI
you usecreateFileURI
and instead oftoString()
you usetoFileString()
?Seems legit to me since we want to use a file anyway.
-
That's it. File systems are a pain :p
-
reporter References
#404: Fixes URI of Association concern to use file URI.→ <<cset 90a9bc72b82a>>
- Log in to comment
Should we save the aspect when the user tries reusing before saving ?