The compiler is correct, what happens if an exception is raised. It goes to
your catch block and writes the debug but then there is no return after
that. Maybe you should be re-raising the exception again.
Regards.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 1:45 PM
Subject: missing return statement error?!??!
> Hi,
> This is not a tomcat's question. I've made a class with a find method.
> When I compile it with ANT, I 've a missing return statement error whereas
> i've specified return type.
> Here is the code :
>
>
> public String [] find(String mail) {
> String system= "qs44a6005";
> String collectionName="JC";
> String Table="T_Client";
> String[] Tab=null;
>
> // Obtenir les param�tres de la requ�te.
> Connection connection=null;
>
>
> try{
> // Chargement du driver JDBC pour AS/400.
>
> DriverManager.registerDriver(
> new com.ibm.as400.access.AS400JDBCDriver());
>
> // Obtient une connection � la database.
> connection = DriverManager.getConnection ("jdbc:as400://" +
> system+ "/" + collectionName,"PCS","PCS");
> Statement lireTable = connection.createStatement ();
> ResultSet rs1= lireTable.executeQuery("SELECT
> NOM,CODE,TEL,PORT,PASS FROM "+collectionName+"."+Table+" WHERE MAIL='"
> +mail+"'");
> if(rs1.next()){
> // on r�cup�re les membres du resultSet
> Tab[0]=rs1.getString("NOM");
> Tab[1]=rs1.getString("CODE");
> Tab[2]=rs1.getString("TEL");
> Tab[3]=rs1.getString("PORT");
> Tab[4]=rs1.getString("PSWD");
>
> }
>
> System.out.println("fin test existe");
> lireTable.close();
> connection.close ();
> return Tab;
>
> }
> catch(Exception e){
> System.out.println ();
> System.out.println ("ERROR: " + e.getMessage());
> }
>
>
> }
>
>
> Thanks.
>
> garsJC
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>