[Bleeding] Cleaned up unsafe casts. Addresses BUKKIT-844
Removed internal collection leaks from PluginDescriptionFile BREAKING: PluginDescriptionFile.getAuthors() now returns List instead of ArrayList Various places with unsafe generics, notably List<Object> getList() in Configurations are now referenced as <?>. This is nonbreaking, but sourcecode will need to be revised when compiled. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package org.bukkit.command.defaults;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -67,7 +68,7 @@ public class VersionCommand extends Command {
|
||||
|
||||
private String getAuthors(final PluginDescriptionFile desc) {
|
||||
StringBuilder result = new StringBuilder();
|
||||
ArrayList<String> authors = desc.getAuthors();
|
||||
List<String> authors = desc.getAuthors();
|
||||
|
||||
for (int i = 0; i < authors.size(); i++) {
|
||||
if (result.length() > 0) {
|
||||
|
||||
Reference in New Issue
Block a user