Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed Jun 25, 2015
2 parents 04eb603 + c3b85b7 commit b5f591e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/com/esotericsoftware/kryo/Kryo.java
Expand Up @@ -383,8 +383,8 @@ protected Serializer newDefaultSerializer (Class type) {
// --- Registration ---

/** Registers the class using the lowest, next available integer ID and the {@link Kryo#getDefaultSerializer(Class) default
* serializer}. If the class is already registered, the existing entry is updated with the new serializer. Registering a
* primitive also affects the corresponding primitive wrapper.
* serializer}. If the class is already registered, no change will be made and the existing registration will be
* returned. Registering a primitive also affects the corresponding primitive wrapper.
* <p>
* Because the ID assigned is affected by the IDs registered before it, the order classes are registered is important when
* using this method. The order must be the same at deserialization as it was for serialization. */
Expand All @@ -394,9 +394,9 @@ public Registration register (Class type) {
return register(type, getDefaultSerializer(type));
}

/** Registers the class using the specified ID and the {@link Kryo#getDefaultSerializer(Class) default serializer}. If the ID is
* already in use by the same type, the old entry is overwritten. If the ID is already in use by a different type, a
* {@link KryoException} is thrown. Registering a primitive also affects the corresponding primitive wrapper.
/** Registers the class using the specified ID and the {@link Kryo#getDefaultSerializer(Class) default serializer}.
* If the class is already registered this has no effect and the existing registration is returned. Registering a
* primitive also affects the corresponding primitive wrapper.
* <p>
* IDs must be the same at deserialization as they were for serialization.
* @param id Must be >= 0. Smaller IDs are serialized more efficiently. IDs 0-8 are used by default for primitive types and
Expand All @@ -422,9 +422,8 @@ public Registration register (Class type, Serializer serializer) {
return classResolver.register(new Registration(type, serializer, getNextRegistrationId()));
}

/** Registers the class using the specified ID and serializer. If the ID is already in use by the same type, the old entry is
* overwritten. If the ID is already in use by a different type, a {@link KryoException} is thrown. Registering a primitive
* also affects the corresponding primitive wrapper.
/** Registers the class using the specified ID and serializer. Providing an ID that is already in use by the same type
* will cause the old entry to be overwritten. Registering a primitive also affects the corresponding primitive wrapper.
* <p>
* IDs must be the same at deserialization as they were for serialization.
* @param id Must be >= 0. Smaller IDs are serialized more efficiently. IDs 0-8 are used by default for primitive types and
Expand All @@ -434,9 +433,8 @@ public Registration register (Class type, Serializer serializer, int id) {
return register(new Registration(type, serializer, id));
}

/** Stores the specified registration. If the ID is already in use by the same type, the old entry is overwritten. If the ID is
* already in use by a different type, a {@link KryoException} is thrown. Registering a primitive also affects the
* corresponding primitive wrapper.
/** Stores the specified registration. If the ID is already in use by the same type, the old entry is overwritten.
* Registering a primitive also affects the corresponding primitive wrapper.
* <p>
* IDs must be the same at deserialization as they were for serialization.
* <p>
Expand Down

0 comments on commit b5f591e

Please sign in to comment.