You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Byron Foster (JIRA)" <de...@velocity.apache.org> on 2008/12/29 04:50:44 UTC

[jira] Created: (VELOCITY-659) Remove throwing Exception from method signatures

Remove throwing Exception from method signatures
------------------------------------------------

                 Key: VELOCITY-659
                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
             Project: Velocity
          Issue Type: Improvement
          Components: Engine
    Affects Versions: 1.7
            Reporter: Byron Foster


Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Byron Foster resolved VELOCITY-659.
-----------------------------------

    Resolution: Fixed

java.lang.Exception is still thrown from the plugin APIs such as LogChute and EventHandlers, but this at least removes them from most user's point of view.  We can address the plugin API when we determine what level of changes are appropriate for the next release.

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709126#action_12709126 ] 

Byron Foster commented on VELOCITY-659:
---------------------------------------

I wonder why Gump has only recently started complaining about it.

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659590#action_12659590 ] 

Nathan Bubna commented on VELOCITY-659:
---------------------------------------

Hmm.   Your change in r729843 is both incomplete (things like VelocityEngine were overlooked), and it makes it so that extensions like VelocityTools will not compile against 1.7-dev anymore.  Gump will be complaining about this a lot.

I'm not so sure it's really worth breaking API compatibility for things like LogChute implementations just to clean this up.   In a 2.x branch, this would be great, but it's a bit unprecedented to break compatibility like this in Velocity's 1.x series.

I'm inclined to veto this change, but i'm still open to being convinced otherwise, if you can. :)

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Will Glass-Husain (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660103#action_12660103 ] 

Will Glass-Husain commented on VELOCITY-659:
--------------------------------------------

Does that mean that plugins implementing the existing interface no longer work?  To me, that breaks backwards compatibility and is a bad idea.

WILL

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Issue Comment Edited: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660118#action_12660118 ] 

byronvf edited comment on VELOCITY-659 at 12/31/08 10:18 AM:
------------------------------------------------------------------

No, this doesn't change the plugin APIs.  when I say "User's point of view" I mean the APIs users work with most directly, mainly Velocity.java and VelocityEngine.java.  To be clear:

 * methods in Velocity.java and VelocityEngine.java no longer throw java.lang.Exception and java.io.IOException

 * Plugin API is unchanged.



      was (Author: byronvf):
    No, this doesn't change the plugin APIs.  when I say "User's point of view" I mean the APIs users work with most directly, mainly Velocity.java and VelocityEngine.java.  To be clear:

 * method in Velocity.java and VelocityEngine.java no longer throw java.lang.Exception and java.io.IOException

 * Plugin API is unchanged.


  
> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660118#action_12660118 ] 

Byron Foster commented on VELOCITY-659:
---------------------------------------

No, this doesn't change the plugin APIs.  when I say "User's point of view" I mean the APIs users work with most directly, mainly Velocity.java and VelocityEngine.java.  To be clear:

 * method in Velocity.java and VelocityEngine.java no longer throw java.lang.Exception and java.io.IOException

 * Plugin API is unchanged.



> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659905#action_12659905 ] 

Nathan Bubna commented on VELOCITY-659:
---------------------------------------

Thanks, Byron.  That should make Gump and me happier. :)  And yeah, i also doubt that anyone was really specifically watching for IOException.  Even if they are, i think that's a fine thing to do in a 1.x release.  Just be sure to have it clearly documented in the change log, as it is an API change.

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Byron Foster (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659742#action_12659742 ] 

Byron Foster commented on VELOCITY-659:
---------------------------------------

I reversed out the LogChute changes since I don't want to deal with package dependency, and this is a rather obscure API.

I added the changes to VelocityEngine, I didn't know it existed, but I like it.

I wonder if there is going to be a 1.7?  It may be to soon to answer this, but I'm thinking probably not.  However, removing Exception from the method signatures would not break existing Velocity integrations since all references must catch Exception, or fall within a method that throws Exception.

The one caveat to this is that in VelocityEngine I removed throwing IOException.  This would break any code that explicitly catches IOException, you can beat me up for this, but I doubt anyone is being so selective..   If there are any knifes thrown at me I'll change IOException back, otherwise, I'll do it for Velocity.java also.  My motives are first to make the Velocity API use unchecked exceptions, which seems like there has already been movement in this direction.   The second is that in the case of evaluate it seems unreasonable to force someone to catch an Exception that may or may not occur depending on there usage, for example passing in a StringWriter.   Anyway, that's my position, but I know these things have a way generating opinions.




> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (VELOCITY-659) Remove throwing Exception from method signatures

Posted by "Nathan Bubna (JIRA)" <de...@velocity.apache.org>.
    [ https://issues.apache.org/jira/browse/VELOCITY-659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708979#action_12708979 ] 

Nathan Bubna commented on VELOCITY-659:
---------------------------------------

The gump complaints about VelocityTools' WebappUberspect led me here.  Looks like the Uberspect plugin API was changed.  Should be fixed now...

> Remove throwing Exception from method signatures
> ------------------------------------------------
>
>                 Key: VELOCITY-659
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-659
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>    Affects Versions: 1.7
>            Reporter: Byron Foster
>
> Remove throwing java.lang.Exception from Velocity methods

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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