Velocity
  1. Velocity
  2. VELOCITY-751

CLONE -Remove "Exception" type throwing.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2
    • Fix Version/s: 1.7, 2.x
    • Component/s: Engine
    • Labels:
      None
    • Environment:
      NA

      Description

      I have to use Checkstyle coding standards at my job. Some methos of Velocity throw exceptions using the raw "Exception" type. So Checkstyle points an error everywhere I use Velocity and, unfortunately, that's a fact I cannot override in my source code. So it would be nice if those "throws Exception" are replaced by some Velocity proper exception.

        Issue Links

          Activity

          Willi Schönborn created issue -
          Willi Schönborn made changes -
          Field Original Value New Value
          Link This issue is a clone of VELOCITY-436 [ VELOCITY-436 ]
          Show
          Willi Schönborn added a comment - I made a clone of this old issue because there are still a lot of places where a java.lang.Exception is thrown. E.g.: http://velocity.apache.org/engine/releases/velocity-1.6.2/apidocs/org/apache/velocity/app/VelocityEngine.html#init(java.util.Properties ) http://velocity.apache.org/engine/releases/velocity-1.6.2/apidocs/org/apache/velocity/app/VelocityEngine.html#getTemplate(java.lang.String,%20java.lang.String ) and many more
          Willi Schönborn made changes -
          Affects Version/s 1.6.2 [ 12313574 ]
          Priority Trivial [ 5 ] Major [ 3 ]
          Fix Version/s 1.5 [ 12310253 ]
          Hide
          Jarkko Viinamäki added a comment -

          The current SVN trunk (head) has most "throws Exception" things removed but there were a few left. This patch removes many incorrect JavaDoc @throws statements and modifies some method signatures.

          There are also some public interfaces that use "throws Exception" quite extensively. This is obviously bad practice.

          Show
          Jarkko Viinamäki added a comment - The current SVN trunk (head) has most "throws Exception" things removed but there were a few left. This patch removes many incorrect JavaDoc @throws statements and modifies some method signatures. There are also some public interfaces that use "throws Exception" quite extensively. This is obviously bad practice.
          Jarkko Viinamäki made changes -
          Attachment velocity-751-exception-fixes.patch [ 12429856 ]
          Hide
          Nathan Bubna added a comment -

          thanks again, Jarkko!

          Show
          Nathan Bubna added a comment - thanks again, Jarkko!
          Nathan Bubna made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.7 [ 12313453 ]
          Fix Version/s 2.0 [ 12310291 ]
          Resolution Fixed [ 1 ]
          Hide
          Nathan Bubna added a comment -

          Re-opening since not all are fixed yet...

          Show
          Nathan Bubna added a comment - Re-opening since not all are fixed yet...
          Nathan Bubna made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Hide
          Nathan Bubna added a comment -

          Ok, i think this is about as fixed as we can reasonably make it for the 1.x family, due to backwards compatibility concerns. If you see other places, please correct me.

          And i've completely fixed this (i think) in 2.0, where we aren't concerned about backwards compatibility.

          Show
          Nathan Bubna added a comment - Ok, i think this is about as fixed as we can reasonably make it for the 1.x family, due to backwards compatibility concerns. If you see other places, please correct me. And i've completely fixed this (i think) in 2.0, where we aren't concerned about backwards compatibility.
          Nathan Bubna made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Mark Thomas made changes -
          Workflow jira [ 12487850 ] Default workflow, editable Closed status [ 12551678 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12551678 ] jira [ 12552552 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Willi Schönborn
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development