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

ASF GitHub Bot commented on KAFKA-4247:
---------------------------------------

rnpridgeon closed pull request #1953: KAFKA-4247: remove root from traversal 
path
URL: https://github.com/apache/kafka/pull/1953
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> kafka-run-class has potential to add a leading colon to classpath
> -----------------------------------------------------------------
>
>                 Key: KAFKA-4247
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4247
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Ryan P
>            Assignee: Ryan P
>
> https://github.com/confluentinc/kafka/blob/trunk/bin/kafka-run-class.sh#L128-L133
> In the event CLASSPATH has not yet been populated this will result in 
> :$file 
> Normally this wouldn't be a problem however Connect's AbstractClassHearder 
> uses ClasspathHelper.forJavaClassPath() to collect it's eligible classes. 
> With a leading colon you will endup with a entry for null which is expanded 
> to the working directory. 
> java -cp ":" test
> []
> java -cp ":Users" test
> [file:/Users/ryan/, file:/Users/ryan/Users]
> This is problematic if the script was run from the root directory since the 
> URLs will be scanned the directories recursively. Ultimately leading to a 
> situation where the entire FileSystem is scanned. This has been known to 
> cause issues for some Docker installations. 
> Typically this is worked around by editing the the kafka-run-class script 
> however I think we should handle this within Connect itself by excluding the 
> root directory. 
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to