#2774 Coding bug in 'todo' demo

closed-fixed
nobody
General (233)
5
2011-07-12
2011-07-09
No

An if statement has been accidentally terminated with semicolon: will always evaluate = true.
Line 81 of EventDao.java

public boolean delete(TodoEvent evt){
Connection conn = null;
Statement stmt = null;
boolean result = false;
try {
// get connection
conn = DriverManager.getConnection(url, user, pwd);
stmt = conn.createStatement();
>>>>> HERE >>>>> if (stmt.executeUpdate("delete from event where id = '" + evt.getId() + "'") > 0);
result = true;

} catch (SQLException e) {
e.printStackTrace();

Discussion

  • Peter Kuo

    Peter Kuo - 2011-07-12
    • status: open --> closed-fixed
     
  • Peter Kuo

    Peter Kuo - 2011-07-12

    fixed since 07/12. Sourceforge file updated, doc in ZK Getting Started updated

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks