ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maarten Coene (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (IVY-1267) Improve diagnostics in ssh resolver
Date Thu, 03 Feb 2011 23:12:28 GMT

     [ https://issues.apache.org/jira/browse/IVY-1267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Maarten Coene resolved IVY-1267.
--------------------------------

    Resolution: Fixed
      Assignee: Maarten Coene

I've updated trunk based on your patch.
Could you give it a try to check if diagnostics have been improved?

thanks!
Maarten

> Improve diagnostics in ssh resolver
> -----------------------------------
>
>                 Key: IVY-1267
>                 URL: https://issues.apache.org/jira/browse/IVY-1267
>             Project: Ivy
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Stepan Koltsov
>            Assignee: Maarten Coene
>            Priority: Minor
>
> Currently I get messages when using SSH resolve:
> ERROR: The uri is in the wrong format
> and
> java.lang.NullPointerException
> This does not help a lot.
> {code}
> Index: src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java
> ===================================================================
> --- src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java  
   (revision 1066801)
> +++ src/java/org/apache/ivy/plugins/repository/ssh/AbstractSshBasedRepository.java  
   (working copy)
> @@ -136,7 +136,7 @@
>              return uri;
>          } catch (URISyntaxException e) {
>              Message.error(e.getMessage());
> -            Message.error("The uri is in the wrong format.");
> +            Message.error("The uri is in the wrong format: '" + source + "'");
>              Message.error("Please use scheme://user:pass@hostname/path/to/repository");
>              return null;
>          }
> Index: src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java
> ===================================================================
> --- src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java   (revision 1066801)
> +++ src/java/org/apache/ivy/plugins/repository/ssh/SshRepository.java   (working copy)
> @@ -167,11 +167,12 @@
>          ChannelExec channel = null;
>          session = getSession(parent);
>          channel = getExecChannel(session);
> -        URI parentUri = null;
> +        URI parentUri;
>          try {
>              parentUri = new URI(parent);
>          } catch (URISyntaxException e1) {
>              // failed earlier
> +           throw new RuntimeException(e1);
>          }
>          String fullCmd = replaceArgument(listCommand, parentUri.getPath());
>          channel.setCommand(fullCmd);
> @@ -235,11 +236,12 @@
>          Message.debug("SShRepository:put called: " + destination);
>          Session session = getSession(destination);
>          try {
> -            URI destinationUri = null;
> +            URI destinationUri;
>              try {
>                  destinationUri = new URI(destination);
>              } catch (URISyntaxException e) {
>                  // failed earlier in getSession()
> +               throw new RuntimeException(e);
>              }
>              String filePath = destinationUri.getPath();
>              int lastSep = filePath.lastIndexOf(fileSeparator);
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message