Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins #2

Merged
merged 10 commits into from
May 11, 2018
Merged

Plugins #2

merged 10 commits into from
May 11, 2018

Conversation

bsideup
Copy link
Owner

@bsideup bsideup commented May 11, 2018

No description provided.

@bsideup bsideup requested a review from lanwen May 11, 2018 14:20
for (String libDirectory : this.pluginClasspath.getLibDirectories()) {
Path libPath = jarFileSystem.getPath(libDirectory);
if (Files.exists(libPath)) {
Files.walk(libPath, 1).filter(it -> !Files.isDirectory(it)).forEach(it -> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should you close this stream?

Copy link
Owner Author

Choose a reason for hiding this comment

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

nice catch :)

Files.copy(it, tempFile, StandardCopyOption.REPLACE_EXISTING);
pluginClassLoader.addURL(tempFile.toUri().toURL());
} catch (Exception e) {
e.printStackTrace();
Copy link
Collaborator

Choose a reason for hiding this comment

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

meh :|

Copy link
Owner Author

Choose a reason for hiding this comment

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

I remember fixing it o_O anyways, fixed now :)

@FieldDefaults(makeFinal = true)
public class RecordPostProcessorChain {

Collection<RecordPostProcessor> processors;
Copy link
Collaborator

Choose a reason for hiding this comment

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

is better to store it as List explicitly indicating that collection is sorted?

Copy link
Owner Author

Choose a reason for hiding this comment

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

no, did it intentionally, see TODO in getAll. Chains should sort them explicitly (will be added later)

compileOnly project(":api")
compileOnly 'io.projectreactor:reactor-core'

compile ('com.amazonaws:aws-java-sdk-dynamodb:1.11.192') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why not the 1.11.321?

Copy link
Owner Author

Choose a reason for hiding this comment

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

the same version as it used to be, don't want to do the dependencies update during this PR, might cause hidden issues


@Bean
InMemoryPositionsStorage inMemoryPositionsStorage() {
PositionsStorage inMemoryPositionsStorage() {
log.warn("\n" +
String.format("%0106d", 0).replace("0", "=") + "\n" +
Copy link
Collaborator

Choose a reason for hiding this comment

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

what this line do?

Copy link
Owner Author

Choose a reason for hiding this comment

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

===================================================

:D

@Override
@SneakyThrows
public List<Path> getPluginPaths() {
PathMatcher[] matchers = Stream.of(liiklusPluginManager.getPluginsPathMatcher().split("/"))
Copy link
Collaborator

@lanwen lanwen May 11, 2018

Choose a reason for hiding this comment

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

will it grab plugins./**/*.jar (for any depth pattern)?

pluginClassLoader.addFile(pluginPath.toFile());
}

protected void loadJars(Path pluginPath, PluginClassLoader pluginClassLoader) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it overridden?

@bsideup bsideup merged commit 87e6b06 into master May 11, 2018
@bsideup bsideup deleted the plugins branch May 11, 2018 16:30
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.

None yet

2 participants