|
List Info
Thread: XPackageManager.addPackage(...) dealing with null and empty String
|
|
| XPackageManager.addPackage(...) dealing
with null and empty String |

|
2007-10-16 09:59:17 |
Hi together,
currently I implement a package manager in Java for
deploying my UNO
extension. But I experienced some weird problems I want to
share with you.
First this information: my extension is an .oxt package
containing a jar
file. The problem I describe next does not occur with the
non-Java
packages I tested.
I use the XPackageManager.addPackage() method. This method
takes 4
arguments. The second is the "media-type of package,
empty string if to
be detected". If I pass "null" for the second
argument, the package is
installed without failures. But I cannot use my implemented
protocol
handler! If I pass just an empty String (""), the
package is also
installed (again, no failures while installing) and my
protocol handler
works.
Is this a bug or a feature?
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: XPackageManager.addPackage(...)
dealing with null and empty String |

|
2007-10-16 12:20:59 |
Tobias Krais wrote:
> Hi together,
>
> currently I implement a package manager in Java for
deploying my UNO
> extension. But I experienced some weird problems I want
to share with you.
> First this information: my extension is an .oxt package
containing a jar
> file. The problem I describe next does not occur with
the non-Java
> packages I tested.
>
> I use the XPackageManager.addPackage() method. This
method takes 4
> arguments. The second is the "media-type of
package, empty string if to
> be detected". If I pass "null" for the
second argument, the package is
> installed without failures. But I cannot use my
implemented protocol
> handler! If I pass just an empty String (""),
the package is also
> installed (again, no failures while installing) and my
protocol handler
> works.
> Is this a bug or a feature?
Without further knowledge about the internals I think that
if the
documentation asks you to pass an empty string you should do
that (and
it obviously works then, as you wrote). "null" is
not an empty string, I
think you are lucky that it doesn't crash or at least throws
an exception.
Ciao,
Mathias
--
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/Gu
llFOSS
Please don't reply to "nospamformba gmx.de".
I use it for the OOo lists and only rarely read other mails
sent to it.
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: XPackageManager.addPackage(...)
dealing with null and empty String |

|
2007-10-17 05:02:12 |
Sounds weird. Assuming that you call the packagemanager API
from Java,
I'd expect you get a RuntimeException ("null-ref
given!").
my 2 cents,
Daniel
Tobias Krais wrote:
> Hi together,
>
> currently I implement a package manager in Java for
deploying my UNO
> extension. But I experienced some weird problems I want
to share with you.
> First this information: my extension is an .oxt package
containing a jar
> file. The problem I describe next does not occur with
the non-Java
> packages I tested.
>
> I use the XPackageManager.addPackage() method. This
method takes 4
> arguments. The second is the "media-type of
package, empty string if to
> be detected". If I pass "null" for the
second argument, the package is
> installed without failures. But I cannot use my
implemented protocol
> handler! If I pass just an empty String (""),
the package is also
> installed (again, no failures while installing) and my
protocol handler
> works.
> Is this a bug or a feature?
>
> Greetings, Tobias
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: XPackageManager.addPackage(...)
dealing with null and empty String |

|
2007-10-18 01:48:49 |
Hi Daniel and Mathias,
> Sounds weird. Assuming that you call the packagemanager
API from Java,
> I'd expect you get a RuntimeException ("null-ref
given!").
I have the same opinion. Using "Null" should
either throw an exception,
or it should work like an empty string. Any other opinions?
Should I create an issue?
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| Re: XPackageManager.addPackage(...)
dealing with null and empty String |

|
2007-10-23 03:39:14 |
Hi together,
>> Sounds weird. Assuming that you call the
packagemanager API from Java,
>> I'd expect you get a RuntimeException
("null-ref given!").
>
> I have the same opinion. Using "Null" should
either throw an exception,
> or it should work like an empty string. Any other
opinions?
>
> Should I create an issue?
Here is the link to the issue:
http://qa.openoffice.org/issues/show_bug.cgi?id=82876
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|