You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/07/07 09:38:00 UTC

[jira] [Work logged] (CAMEL-13592) camel-sql - Repeated parameters in URI are not treated correctly

     [ https://issues.apache.org/jira/browse/CAMEL-13592?focusedWorklogId=272914&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-272914 ]

ASF GitHub Bot logged work on CAMEL-13592:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jul/19 09:37
            Start Date: 07/Jul/19 09:37
    Worklog Time Spent: 10m 
      Work Description: davsclaus commented on pull request #2956: CAMEL-13592 Repeated parameters in URI are not treated correctly
URL: https://github.com/apache/camel/pull/2956
 
 
   
 
----------------------------------------------------------------
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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 272914)
    Time Spent: 20m  (was: 10m)

> camel-sql - Repeated parameters in URI are not treated correctly
> ----------------------------------------------------------------
>
>                 Key: CAMEL-13592
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13592
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-sql
>    Affects Versions: 2.20.1
>            Reporter: Kosta Kostelnik
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.0.0, 3.0.0.M5
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When constructing Camel SQL component with the following URI:
> {code:java}
> sql:INSERT INTO TABLE ....?batch=true&...&batch=true{code}
> Resulting camel endpoint ends up with batch == false. The reason for this is found in 
> {code:java}
> private static void addParameter // this is in UriSupport.java{code}
> This method adds values into a list and then setting the parameter does not work correctly. I believe that Camel should be more linient for such "errors" (which can occur if you construct URI programatically). 
> I suggest parameter value detection. If
> {code:java}
> existing.equals(value) // to use actual names of variables from the code{code}
> then just ignore. DO NOT do the following (list construction; current behavior):
> {code:java}
> if (existing instanceof List) {
>     list = CastUtils.cast((List<?>) existing);
> } else {
>     // create a new list to hold the multiple values
>     list = new ArrayList<String>();
>     String s = existing != null ? existing.toString() : null;
>     if (s != null) {
>         list.add(s);
>     }
> }
> list.add(value);
> {code}
> In the end the URI shown in the beginning will result in Component with batch equal to false. Which is really hard to determine why and what happened. 
>  
> I believe this is a generic problem tho



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