[Fwd: info/DEV300 CWS sb113 : Java UnoRuntime.queryInterface simplification]

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Fwd: info/DEV300 CWS sb113 : Java UnoRuntime.queryInterface simplification]

stephan.bergmann
As automatic mailing from EIS to interface-announce appears to be broken:

-------- Original Message --------
Subject: info/DEV300 CWS sb113 : Java UnoRuntime.queryInterface
simplification
Date: Tue, 18 Aug 2009 10:15:29 +0200 (CEST)
From: [hidden email]
To: [hidden email], [hidden email]



           Type: info
          Title: Java UnoRuntime.queryInterface simplification
      Posted by: [hidden email]
       Affected: [hidden email],
          TaskId: i102469
<http://www.openoffice.org/issues/show_bug.cgi?id=102469>
Effective from: DEV300 CWS sb113
            CWS:
<http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/sb113>
     CWS status: new


*Summary*
--------
com.sun.star.uno.UnoRuntime:
- Object queryInterface(Class, Object)
+ <T extends XInterface> T queryInterface(Class<T>, Object)

*Description*
-------------
With the URE/OOo Java baseline lifted to Java 5,
UnoRuntime.queryInterface can now make use of generics, and in a call like

   XFoo x = UnoRuntime.queryInterface(XFoo.class, o);

it is no longer necessary to explicitly cast the return value of
queryInterface to (XFoo).

Strictly speaking, due to the "extends XInterface," this change is
compile-time incompatible (but strictly run-time compatible).  If this
turns out to be a problem in practice (which I doubt), we can easily
make the change strictly compile-time compatible (by simply dropping
the "extends XInterface" qualification).

I adapted all the relevant calls to UnoRuntime.queryInterface in the
URE-related OOo code modules (in bridges, javaunohelper, jurt,
ridljar, testtools, and ure), and added a note about the changed Java
method to the Developer's Guide at
<http://wiki.services.openoffice.org/w/index.php?title=Documentation/DevGuide/ProUNO/Java/Handling_Interfaces&oldid=137069>.
  Other people might want to eventually adapt further OOo code, the SDK
examples, and/or the complete Developer's Guide.



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: info/CWS jl127 Interface change XSecurityEnvironment

Joachim Lingner - Sun Germany Software Engineer - ham02 - Hamburg
            Type: info
           Title: Java UnoRuntime.queryInterface simplification
       Posted by: [hidden email]
        Affected:
          TaskId: i100873
  <http://qa.openoffice.org/issues/show_bug.cgi?id=100873>
  Effective from: DEV300m57 CWS jl127


  *Summary*
  --------
  com.sun.star.xml.crypto.XSecurityEnvironment:
  - long verifyCertificate([in] com::sun::star::security::XCertificate cert)
  + long verifyCertificate([in] com::sun::star::security::XCertificate cert,
       [in] sequences<com::sun::star::security::XCertificate>
intermediaCerts)


  *Description*
  -------------
The interface is unpublished !

Additional certificates can now be provided to the functions, which are
needed to validate the certificate. This is necessary, if intermediate
certificates, that is, all certificates between the end and the root
certificate in the certificate chain, are otherwise not available or
cannot be obtained.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Fwd: info/DEV300 CWS sb113 : Java UnoRuntime.queryInterface simplification]

stephan.bergmann
In reply to this post by stephan.bergmann
See inline for fix:

On 08/19/09 16:53, Stephan Bergmann wrote:

> As automatic mailing from EIS to interface-announce appears to be broken:
>
> -------- Original Message --------
> Subject: info/DEV300 CWS sb113 : Java UnoRuntime.queryInterface
> simplification
> Date: Tue, 18 Aug 2009 10:15:29 +0200 (CEST)
> From: [hidden email]
> To: [hidden email], [hidden email]
>
>
>
>           Type: info
>          Title: Java UnoRuntime.queryInterface simplification
>      Posted by: [hidden email]
>       Affected: [hidden email],
>          TaskId: i102469
> <http://www.openoffice.org/issues/show_bug.cgi?id=102469>
> Effective from: DEV300 CWS sb113
>            CWS:
> <http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/sb113>
>     CWS status: new
>
>
> *Summary*
> --------
> com.sun.star.uno.UnoRuntime:
> - Object queryInterface(Class, Object)
> + <T extends XInterface> T queryInterface(Class<T>, Object)
>
> *Description*
> -------------
> With the URE/OOo Java baseline lifted to Java 5,
> UnoRuntime.queryInterface can now make use of generics, and in a call like
>
>   XFoo x = UnoRuntime.queryInterface(XFoo.class, o);
>
> it is no longer necessary to explicitly cast the return value of
> queryInterface to (XFoo).
>
> Strictly speaking, due to the "extends XInterface," this change is
> compile-time incompatible (but strictly run-time compatible).  If this
> turns out to be a problem in practice (which I doubt), we can easily
> make the change strictly compile-time compatible (by simply dropping
> the "extends XInterface" qualification).

Nonsense.  The "extends XInterface" is (of course) a run-time
incompatible change, as it changes the signature of that queryInterface
method from (Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object; to
(Ljava/lang/Class;Ljava/lang/Object;)Lcom/sun/star/uno/XInterface;.  So
I had to drop the qualification again.

-Stephan

> I adapted all the relevant calls to UnoRuntime.queryInterface in the
> URE-related OOo code modules (in bridges, javaunohelper, jurt,
> ridljar, testtools, and ure), and added a note about the changed Java
> method to the Developer's Guide at
> <http://wiki.services.openoffice.org/w/index.php?title=Documentation/DevGuide/ProUNO/Java/Handling_Interfaces&oldid=137069>.
>
>  Other people might want to eventually adapt further OOo code, the SDK
> examples, and/or the complete Developer's Guide.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

info/CWS jl127 Interface change XSecurityEnvironment

Joachim Lingner - Sun Germany Software Engineer - ham02 - Hamburg
In reply to this post by Joachim Lingner - Sun Germany Software Engineer - ham02 - Hamburg
Joachim Lingner - Sun Germany Software Engineer - ham02 - Hamburg schrieb:

>            Type: info
>           Title: Java UnoRuntime.queryInterface simplification
>       Posted by: [hidden email]
>        Affected:
>          TaskId: i100873
>  <http://qa.openoffice.org/issues/show_bug.cgi?id=100873>
>  Effective from: DEV300m57 CWS jl127
>
>
>  *Summary*
>  --------
>  com.sun.star.xml.crypto.XSecurityEnvironment:
>  - long verifyCertificate([in] com::sun::star::security::XCertificate cert)
>  + long verifyCertificate([in] com::sun::star::security::XCertificate cert,
>       [in] sequences<com::sun::star::security::XCertificate>
> intermediaCerts)
>
>
>  *Description*
>  -------------
> The interface is unpublished !
>
> Additional certificates can now be provided to the functions, which are
> needed to validate the certificate. This is necessary, if intermediate
> certificates, that is, all certificates between the end and the root
> certificate in the certificate chain, are otherwise not available or
> cannot be obtained.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]