mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Fix typos
This commit is contained in:
@ -513,11 +513,11 @@ public class MainUtil {
|
||||
}
|
||||
try (FileInputStream fIn = new FileInputStream(sourceFile); FileChannel source = fIn.getChannel();
|
||||
FileOutputStream fOut = new FileOutputStream(destFile); FileChannel destination = fOut.getChannel()) {
|
||||
long transfered = 0;
|
||||
long transferred = 0;
|
||||
long bytes = source.size();
|
||||
while (transfered < bytes) {
|
||||
transfered += destination.transferFrom(source, 0, source.size());
|
||||
destination.position(transfered);
|
||||
while (transferred < bytes) {
|
||||
transferred += destination.transferFrom(source, 0, source.size());
|
||||
destination.position(transferred);
|
||||
}
|
||||
}
|
||||
return destFile;
|
||||
|
@ -131,13 +131,13 @@ public class ReflectionUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> T callConstructor(Constructor<T> constructor, Object... paramaters) {
|
||||
public static <T> T callConstructor(Constructor<T> constructor, Object... parameters) {
|
||||
if (constructor == null) {
|
||||
throw new RuntimeException("No such constructor");
|
||||
}
|
||||
constructor.setAccessible(true);
|
||||
try {
|
||||
return constructor.newInstance(paramaters);
|
||||
return constructor.newInstance(parameters);
|
||||
} catch (InvocationTargetException ex) {
|
||||
throw new RuntimeException(ex.getCause());
|
||||
} catch (Exception ex) {
|
||||
|
@ -37,7 +37,7 @@ public class ReflectionUtils9 {
|
||||
// 3. build new enum
|
||||
T newValue = (T) makeEnum(enumType, // The target enum class
|
||||
enumName, // THE NEW ENUM INSTANCE TO BE DYNAMICALLY ADDED
|
||||
values.size()); // can be used to pass values to the enum constuctor
|
||||
values.size()); // can be used to pass values to the enum constructor
|
||||
|
||||
// 4. add new value
|
||||
values.add(newValue);
|
||||
|
Reference in New Issue
Block a user