robertoprato / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

com.ibm.oti.connection.CreateConnection.setParameters2 has wrong return type #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use IBM's WEME (J9) JVM v6.1.1 for MIDP 2.0
2. Call Connector.open() to any Bluetooth address using any Bluetooth protocol
3. The JVM hangs (or rarely crashes)

What is the expected output? What do you see instead?

   Instead of returning a Connection object the JVM hangs or crahses.

What version of the product are you using? On what operating system?

   I am using a Samsung BlackJack running Windows Mobile 5.0 Smartphone
edition.  The JVM is IBM's Websphere Everyplace Microedition (WEME or J9)
version 6.1.1 for MIDP 2.0 (not the Personal Profile implementation). 
However, all that matters to reproduce the bug is the JVM.

Please provide any additional information below.

   I have attached the fix.
   The problem is the mock interface in the BlueCove source of
com.ibm.oti.connection.CreateConnection has the wrong return type for the
setParameters2 method.  It returns "void" instead of
"javax.microedtion.io.Connection".  This should be wrong for any J9 version
because otherwise the method signature is identical to setParameters (i.e.
setParameters2 must have been declared because they wanted a different
return type from setParameters).
   By correcting the method signature and fixing the compilation errors
everything works.  The errors are in the implementations of
CreateConnection and they just need to change their setParameter2 to return
a Connection and their implementations to "return impl;".

Original issue reported on code.google.com by deanbro...@gmail.com on 2 Sep 2007 at 5:33

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in version 2.0.2-SNAPSHOT

Original comment by skarzhev...@gmail.com on 9 Sep 2007 at 12:55

GoogleCodeExporter commented 8 years ago

Original comment by skarzhev...@gmail.com on 9 Sep 2007 at 5:30