diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-05-27 17:51:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-05-27 18:15:33 +0200 |
commit | 6b562710cb8051e921726899246b421b197d49f0 (patch) | |
tree | 38d9db8e6438b9c213a6a47b41eb3b2b0a4de979 /i18nutil | |
parent | 740c7b1bb2132852784c01dfe21112ced3314eb1 (diff) |
Let package_ucp::ContentProvider::createPackage throw exceptions on failure
...instead of returning a null XHierarchicalNameAccess. Otherwise, UCB's
globalTransfer from a vnd.sun.star.package URL that denotes a file that is not a
zip file to a file URL folder (i.e., to extract the zip content) silently
succeeds but just creates an empty file in the target folder. That, in turn,
causes "unopkg add foo.oxt", where foo.oxt is a file that is not a zip file, to
silently succeed and add an "empty" extension.
This change is somewhat bold in that it changes createPackage from "can return
empty reference" to "never returns empty reference, but can throw
RuntimeException." Especially, it considers "empty name" as a (silent)
violation of its contract with its caller now. I hope this does not affect any
legitimate scenarios---at least, it does not break a "make check" here. (In
turn, the two package_ucp::Content::getPackage overloads change to never return
a null reference, either. And I changed the parameters of createPackage, seeing
that all call-sites pass in some PackageUri's getPackage()/getParam() pair.)
Change-Id: I0eab5f8059dfedefc7030da38da528ba21ea8d79
Diffstat (limited to 'i18nutil')
0 files changed, 0 insertions, 0 deletions