Reverted EditableDefaultClassResolver
This commit is contained in:
parent
24d68a1614
commit
d662f5c37c
|
@ -22,13 +22,13 @@ import org.bouncycastle.crypto.modes.GCMBlockCipher;
|
|||
import org.bouncycastle.crypto.params.ParametersWithIV;
|
||||
|
||||
import com.esotericsoftware.kryo.Kryo;
|
||||
import com.esotericsoftware.kryo.util.DefaultClassResolver;
|
||||
import com.esotericsoftware.kryo.util.DefaultStreamFactory;
|
||||
import com.esotericsoftware.kryo.util.MapReferenceResolver;
|
||||
|
||||
import dorkbox.network.pipeline.ByteBufInput;
|
||||
import dorkbox.network.pipeline.ByteBufOutput;
|
||||
import dorkbox.network.serialization.CryptoSerializationManager;
|
||||
import dorkbox.network.serialization.EditableDefaultClassResolver;
|
||||
import dorkbox.util.bytes.BigEndian;
|
||||
import dorkbox.util.bytes.OptimizeUtilsByteArray;
|
||||
import dorkbox.util.bytes.OptimizeUtilsByteBuf;
|
||||
|
@ -88,7 +88,7 @@ class KryoExtra<C extends CryptoConnection> extends Kryo {
|
|||
|
||||
public
|
||||
KryoExtra(final CryptoSerializationManager serializationManager) {
|
||||
super(new EditableDefaultClassResolver(), new MapReferenceResolver(), new DefaultStreamFactory());
|
||||
super(new DefaultClassResolver(), new MapReferenceResolver(), new DefaultStreamFactory());
|
||||
|
||||
this.serializationManager = serializationManager;
|
||||
}
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright 2018 dorkbox, llc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package dorkbox.network.serialization;
|
||||
|
||||
import com.esotericsoftware.kryo.util.DefaultClassResolver;
|
||||
import com.esotericsoftware.kryo.util.Util;
|
||||
|
||||
public
|
||||
class EditableDefaultClassResolver extends DefaultClassResolver {
|
||||
public
|
||||
EditableDefaultClassResolver() {
|
||||
}
|
||||
|
||||
public
|
||||
void deleteRegistrationType(Class type) {
|
||||
if (type.isPrimitive()) {
|
||||
classToRegistration.remove(Util.getWrapperClass(type));
|
||||
}
|
||||
else {
|
||||
classToRegistration.remove(type);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user