Remember to perform deep cloning.

This commit is contained in:
Kristian S. Stangeland 2012-12-10 16:30:48 +01:00
parent 40345f25ff
commit afdb0d0324
3 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<groupId>com.comphenix.protocol</groupId>
<artifactId>ProtocolLib</artifactId>
<name>ProtocolLib</name>
<version>1.8.0-SNAPSHOT</version>
<version>1.8.0</version>
<description>Provides read/write access to the Minecraft protocol.</description>
<url>http://dev.bukkit.org/server-mods/protocollib/</url>
<developers>

View File

@ -300,7 +300,7 @@ public class WrappedDataWatcher implements Iterable<WrappedWatchableObject> {
// Make a new copy instead
for (WrappedWatchableObject watchable : this) {
clone.setObject(watchable.getIndex(), watchable.getValue());
clone.setObject(watchable.getIndex(), watchable.getClonedValue());
}
return clone;
}

View File

@ -307,7 +307,7 @@ public class WrappedWatchableObject {
}
// Helper
private Object getClonedValue() throws FieldAccessException {
Object getClonedValue() throws FieldAccessException {
Object value = getValue();
// Only a limited set of references types are supported