You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-dev@jakarta.apache.org by bu...@apache.org on 2008/10/25 13:35:33 UTC

DO NOT REPLY [Bug 46086] New: javax.servlet.jsp.jstl.sql.ResultSupport.java silently swallows SQLException

https://issues.apache.org/bugzilla/show_bug.cgi?id=46086

           Summary: javax.servlet.jsp.jstl.sql.ResultSupport.java silently
                    swallows SQLException
           Product: Taglibs
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Standard Taglib
        AssignedTo: taglibs-dev@jakarta.apache.org
        ReportedBy: cbiswa@gmail.com


Please replace the catch clause in
javax.servlet.jsp.jstl.sql.ResultSupport.java methods to throw a wrapped
RuntimeException instead of silently swallowing SQLException.

Replace:
} catch (SQLException ex) {
            return null;
        }

By something like the following:

} catch (SQLException ex) {
            throw new RuntimeException(ex);
        }


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46086] javax.servlet.jsp.jstl.sql.ResultSupport.java silently swallows SQLException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46086





--- Comment #1 from Henri Yandell <ba...@apache.org>  2008-11-03 15:34:17 PST ---
*grumble*

Easiest fix - throw SQLException from those methods. Can't - it's in the spec.
Plus it would be a bit of a back compat surprise.

Next - create a new file - can't this is spec land. 

Next - use src/org/apache/taglibs/standard/tag/common/sql/ResultImpl.java
directly rather than ResultSupport. Of course - that means people aren't using
the spec anymore even if it is the same class (or copy of that class). Still -
worth doing I think, so I've made that commit.

Next is your RuntimeException, but that's another back compat surprise for
people. 

Here's my change:

svn ci -m "Adding constructors to ResultImpl to work around the SQLException
hiding in ResultSupport - and noted this in ResultSupport as per #46086" src

Sending        src/javax/servlet/jsp/jstl/sql/ResultSupport.java
Sending        src/org/apache/taglibs/standard/tag/common/sql/ResultImpl.java
Transmitting file data ..
Committed revision 711123 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=711123 ).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 46086] javax.servlet.jsp.jstl.sql.ResultSupport.java silently swallows SQLException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46086


Henri Yandell <ba...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-help@jakarta.apache.org