-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Shreyas Kaushik wrote:
> Hi,
>
> I am attaching the patch to fix the Open issue with key *Derby-33*
> having the description *Connection.setTypeMap throws unimplemented
> exception with empty map*.
>
> This patch takes care of proper handling of the empty map condition.
>
> I have also updated JIRA with my comments on 18-Nov-2004.
>
> thanks
> Shreyas
>
>
> ------------------------------------------------------------------------
>
> Index: java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java
> ===================================================================
> --- java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java
(revision 105806)
> +++ java/engine/org/apache/derby/impl/jdbc/EmbedConnection20.java
(working copy)
> @@ -109,7 +109,10 @@
> * @exception SQLException Feature not implemented for now.
> */
> public void setTypeMap(java.util.Map map) throws SQLException {
> - throw Util.notImplemented();
> + if((map != null)) {
> + if(!(map.isEmpty()))
> + throw Util.notImplemented();
> + }
> }
>
> /*
Thanks for the patch, though I think the fix does not handle null
correctly. Passing in null should throw an exception, not be silently
ignored.
See this message I sent yesterday.
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=950
Also I think this is a partial fix to Derby 33. Derby should be
consistent in empty map (and null) handling in other JDBC methods that
take a type Map (ie. getObject in ResultSet and CallableStatement).
Dan.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFBnitCIv0S4qsbfuQRApHlAJ4zg43NoYl+7PBHZCv7Z4fKcfy0TQCfWtUY
2+At27jA5xEDXOd043EPaJM=
=GsfY
-----END PGP SIGNATURE-----