[
https://issues.apache.org/jira/browse/KAFKA-4247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15543346#comment-15543346
]
ASF GitHub Bot commented on KAFKA-4247:
---------------------------------------
GitHub user rnpridgeon opened a pull request:
https://github.com/apache/kafka/pull/1953
KAFKA-4247: remove root from traversal path
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rnpridgeon/kafka KAFKA-4247
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1953.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1953
----
commit 9b789c2b76e02e2a327d448b2119082b8274e772
Author: rnpridgeon <[email protected]>
Date: 2016-10-03T20:20:18Z
KAFKA-4247: remove root from traversal path
----
> 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 builder[0] = null which translates
> 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
> Reflections will scan the directories recursively. Ultimately leading to a
> situation where the entire FileSystem is scanned. This has proven problematic
> 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.3.4#6332)