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

ASF GitHub Bot logged work on CSV-211:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 24/May/20 14:10
            Start Date: 24/May/20 14:10
    Worklog Time Spent: 10m 
      Work Description: garydgregory commented on pull request #71:
URL: https://github.com/apache/commons-csv/pull/71#issuecomment-633236752


   > It looks like all the builds are failing on Java 15-ea build for 
maven-bundle-plugin
   > 
   > ```
   > [INFO] --- maven-bundle-plugin:4.2.1:manifest (bundle-manifest) @ 
commons-csv ---
   > [ERROR] An internal error occurred
   > java.util.ConcurrentModificationException
   >     at java.util.TreeMap.callMappingFunctionWithCheck (TreeMap.java:742)
   >     at java.util.TreeMap.computeIfAbsent (TreeMap.java:558)
   >     at aQute.bnd.osgi.Jar.putResource (Jar.java:288)
   >     at aQute.bnd.osgi.Jar$1.visitFile (Jar.java:202)
   >     at aQute.bnd.osgi.Jar$1.visitFile (Jar.java:177)
   >     at java.nio.file.Files.walkFileTree (Files.java:2804)
   >     at aQute.bnd.osgi.Jar.buildFromDirectory (Jar.java:176)
   >     at aQute.bnd.osgi.Jar.<init> (Jar.java:119)
   >     at aQute.bnd.osgi.Jar.<init> (Jar.java:172)
   >     at org.apache.felix.bundleplugin.BundlePlugin.getOSGiBuilder 
(BundlePlugin.java:604)
   >     at org.apache.felix.bundleplugin.ManifestPlugin.getAnalyzer 
(ManifestPlugin.java:285)
   >     at org.apache.felix.bundleplugin.ManifestPlugin.execute 
(ManifestPlugin.java:111)
   >     at org.apache.felix.bundleplugin.BundlePlugin.execute 
(BundlePlugin.java:364)
   >     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:137)
   >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:210)
   >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:156)
   >     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:148)
   >     at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
   >     at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
   >     at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
   >     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
   >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
   >     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
   >     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
   >     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
   >     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
   >     at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
   >     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native 
Method)
   >     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:64)
   >     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
   >     at java.lang.reflect.Method.invoke (Method.java:564)
   >     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
   >     at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
   >     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
   >     at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
   > [INFO] 
------------------------------------------------------------------------
   > [INFO] BUILD FAILURE
   > [INFO] 
------------------------------------------------------------------------
   > [INFO] Total time:  5.507 s
   > [INFO] Finished at: 2020-05-18T09:34:52Z
   > [INFO] 
------------------------------------------------------------------------
   > [ERROR] Failed to execute goal 
org.apache.felix:maven-bundle-plugin:4.2.1:manifest (bundle-manifest) on 
project commons-csv: Internal error in maven-bundle-plugin: 
ConcurrentModificationException -> [Help 1]
   > ```
   
   That will be fixed as soon as https://github.com/bndtools/bnd/releases 5.1 
is out which we can then use to configuring the bundle plugi, assuming there 
are no incomaptibilities. They are on RC2 ATM.
   


----------------------------------------------------------------
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:
[email protected]


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

    Worklog Id:     (was: 436894)
    Time Spent: 40m  (was: 0.5h)

> CSVFormat.format trims last delimiter if the delimiter is a white space
> -----------------------------------------------------------------------
>
>                 Key: CSV-211
>                 URL: https://issues.apache.org/jira/browse/CSV-211
>             Project: Commons CSV
>          Issue Type: Bug
>    Affects Versions: 1.4
>         Environment: Any.
>            Reporter: Alpesh Kulkarni
>            Priority: Minor
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The function CSVFormat.format() trims off the last delimiter if the delimiter 
> is a white space character and the value in the last column is null.
> {code:java}
>     public String format(Object... values) {
>         StringWriter out = new StringWriter();
>         try {
>             (new CSVPrinter(out, this)).printRecord(values);
>             return out.toString().trim();
>         } catch (IOException var4) {
>             throw new IllegalStateException(var4);
>         }
>     }
> {code}
> For example, consider the following records (\t = tab)-
> ID{color:red}\t{color}Name{color:red}\t{color}Country{color:red}\t{color}Age
> 1{color:red}\t{color}John Doe{color:red}\t{color}USA{color:red}\t{color}20
> 2{color:red}\t{color}Jane Doe{color:red}\t{color}USA{color:red}\t{color}
> The CSVFormat.format() on both the rows returns the following -
> ID{color:red}\t{color}Name{color:red}\t{color}Country{color:red}\t{color}Age
> 1{color:red}\t{color}John Doe{color:red}\t{color}USA{color:red}\t{color}20
> 2{color:red}\t{color}Jane Doe{color:red}\t{color}USA
> Note that there is a missing delimiter for the last column in the second 
> record.
> This usually causes schema mismatch when we try and read back the CSV file as 
> there is one less column in all the rows which have a null at the end.
> I feel the trim() is unnecessary while returning *out.toString()*



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to