karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-6270) client could be more verbose on config error
Date Sat, 18 May 2019 05:58:00 GMT

    [ https://issues.apache.org/jira/browse/KARAF-6270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16843094#comment-16843094
] 

ASF GitHub Bot commented on KARAF-6270:
---------------------------------------

jbonofre commented on pull request #844: [KARAF-6270] Using default value in ClientConfig
when using invalid value
URL: https://github.com/apache/karaf/pull/844
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> client could be more verbose on config error
> --------------------------------------------
>
>                 Key: KARAF-6270
>                 URL: https://issues.apache.org/jira/browse/KARAF-6270
>             Project: Karaf
>          Issue Type: Bug
>    Affects Versions: 4.2.5
>            Reporter: Bernd Eckenfels
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 4.3.0, 4.2.6
>
>
> When I have a "sshPort=" (empty) property then client.bat/sh will not use the default
port. Whats worse is, that the resulting error (even when -p is specified) does not tell me
what config file and what option is the problem:
>     Exception in thread "main" java.lang.NumberFormatException: For input string:
""
>             at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
>             at java.lang.Integer.parseInt(Integer.java:592)
>             at java.lang.Integer.parseInt(Integer.java:615)
>             at org.apache.karaf.client.ClientConfig.getInt(ClientConfig.java:238)
>             at org.apache.karaf.client.ClientConfig.<init>(ClientConfig.java:60)
>             at org.apache.karaf.client.Main.main(Main.java:76)
> I am willing to provide a patch which adds the property name to this exception. However
I think for trimmed empty properties it should fall back to the default as well.
> Question: what about invalid (non-numeric) content? Should it also fall back to the default
(asuming it might be even overwritten on the command line) as well or should we keep the (enhanced)
exception?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message