Remove io.netty.packagePrefix system property

Motivation:
Now that the NativeLibraryLoader implicitly detects the shaded package prefix we no longer need the io.netty.packagePrefix system property.

Modifications:
- Remove io.netty.packagePrefix processing from NativeLibraryLoader

Result:
Code is cleaner.
This commit is contained in:
Scott Mitchell 2017-08-03 22:35:54 -07:00 committed by Norman Maurer
parent 32f497760f
commit a75ac747f0

View File

@ -202,10 +202,7 @@ public final class NativeLibraryLoader {
*/
public static void load(String originalName, ClassLoader loader) {
// Adjust expected name to support shading of native libraries.
String implicitPackagePrefix = calculatePackagePrefix();
// The system property should not be necessary; it can be removed in the future.
String packagePrefix = SystemPropertyUtil.get("io.netty.packagePrefix", implicitPackagePrefix);
String name = packagePrefix.replace('.', '-') + originalName;
String name = calculatePackagePrefix().replace('.', '-') + originalName;
String libname = System.mapLibraryName(name);
String path = NATIVE_RESOURCE_HOME + libname;