mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-10-22 12:20:26 +02:00
Do not directly modify dependency Set provided by the plugin
Modifying the Set directory makes assumptions about the created Set. About it's type/implementation (maybe it is immutable/read-only?) and about it's usage/way-of-use that does not break the plugin by adding stuff a Set that might be used differently too etc.
This commit is contained in:
parent
3f62b36b26
commit
2f1f814d43
@ -23,6 +23,7 @@ import java.io.File;
|
||||
import java.sql.Connection;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
@ -89,11 +90,10 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public final void onLoad() {
|
||||
|
||||
try {
|
||||
//Load Core dependencies
|
||||
DependencyLoader.initParentClassLoader(getClass().getClassLoader());
|
||||
Set<Dependency> dependencies = getDependencies();
|
||||
Set<Dependency> dependencies = new HashSet<>(getDependencies());
|
||||
//Use ; instead of . so maven plugin won't relocate it
|
||||
dependencies.add(new Dependency("https://repo1.maven.org/maven2", "org;apache;commons", "commons-text", "1.9"));
|
||||
dependencies.add(new Dependency("https://repo1.maven.org/maven2", "org;apache;commons", "commons-lang3", "3.12.0"));
|
||||
|
Loading…
Reference in New Issue
Block a user