Skip to content

[STORM-3584] Support getting version info from a wildcard classpath entry#3211

Merged
Ethanlm merged 2 commits intoapache:masterfrom
Ethanlm:STORM-3584
Feb 24, 2020
Merged

[STORM-3584] Support getting version info from a wildcard classpath entry#3211
Ethanlm merged 2 commits intoapache:masterfrom
Ethanlm:STORM-3584

Conversation

@Ethanlm
Copy link
Contributor

@Ethanlm Ethanlm commented Feb 19, 2020

https://issues.apache.org/jira/browse/STORM-3584

Current VersionInfo.getFromClasspath method only tries to get version info from the specific property file under a directory, or jar/zip files. It should support a classpath entry like /<parent-path>/*.

Copy link
Contributor

@kishorvpatil kishorvpatil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

List<String> children = new ArrayList<>();
Files.list(parent).forEach(path -> children.add(path.toString()));
Files.list(parent)
//avoid infinite recursion
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

infinite recursion can happen if there is a file named * under /<parent-path>/ directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding.

Copy link
Contributor

@kishorvpatil kishorvpatil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Ethanlm Ethanlm merged commit 3a7e1b9 into apache:master Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants