[jbosstools-issues] [JBoss JIRA] (JBIDE-12338) can openshift depend on egit 1.2 & 2.0 via version range

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Mon Jul 30 11:49:06 EDT 2012


    [ https://issues.jboss.org/browse/JBIDE-12338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708734#comment-12708734 ] 

Andre Dietisheim edited comment on JBIDE-12338 at 7/30/12 11:47 AM:
--------------------------------------------------------------------

looking at things in detail I now see that there are API changes (remember: egit was bumped to a new major version) that make it pretty hard to keep our stuff compatible. The main changes are in the Exceptions being thrown. Inserting additional catch blocks for juno would not compile in indigo since the compiler would complain about unreachable catch blocks. The only solution I currently see is to add the new Exceptions to the method signatures and catch those in the user code.

Ex. git init command additionnally throws a GitAPIException in JGit 2.0. The util method that calls it only throws a CoreException. To keep this signature I'd have to catch GitAPIException but this wont compile in Indigo since it's not thrown in jgit < 2.0 (unreachable catch block). I can solve this by adding the exception to the method signature and add another catch block to the user code. The alternative, to catch Exception (instead of the more specific GitAPIException) looks like a bad option to me.

Any better suggestion?


                
      was (Author: adietish):
    looking at things in detail I now see that there are API changes (remember: egit was bumped to a new major version) that make it pretty hard to keep our stuff compatible. The main changes are in the Exceptions being thrown. Inserting additional catch blocks for juno would not compile in indigo since the compiler would complain about unreachable catch blocks. The only solution I currently see is to add the new Exceptions to the method signatures and catch those in the user code.

Ex. git init command additionnally throws a GitAPIException in JGit 2.0. The util method that calls it only throws a CoreException. To keep this signature I'd have to catch GitAPIException but this wont compile in Indigo since it's not thrown in jgit < 2.0 (unreachable catch block). I can solve this by adding the exception to the method signature and add another catch block to the user code.

Any better suggestion?


                  
> can openshift depend on egit 1.2 & 2.0 via version range
> --------------------------------------------------------
>
>                 Key: JBIDE-12338
>                 URL: https://issues.jboss.org/browse/JBIDE-12338
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: openshift, updatesite, UpStream
>    Affects Versions: 3.3.1
>            Reporter: Nick Boldt
>            Assignee: Andre Dietisheim
>             Fix For: 3.3.2
>
>
> org.jboss.tools.openshift.express.ui 2.3.1.v20120715-0255-H145-Final depends on org.eclipse.egit.ui [1.0.0,2.0.0), but egit 2.0.0 is included in Juno. 
> Can openshift depend on  org.eclipse.egit.ui [1.0.0,3.0.0) instead?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list