Skip to content

Commit

Permalink
Fix various typos noted while reading the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Jun 24, 2016
1 parent 671feec commit b429a08
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Expand Up @@ -16,9 +16,9 @@
import org.hibernate.ogm.util.impl.LoggerFactory;

/**
* A queue for {@link Operation}.
* A queue for {@link Operation}s.
* <p>
* It keeps track of the element that are going to be affected by an {@link InsertOrUpdateTupleOperation}.
* It keeps track of the elements that are going to be affected by an {@link InsertOrUpdateTupleOperation}.
* The queue can be closed, in that case it will throw an exception when trying to add or poll an operation.
*
* @author Guillaume Scheibel &lt;guillaume.scheibel@gmail.com&gt;
Expand All @@ -27,7 +27,7 @@
public class OperationsQueue {

/**
* A queue that it is always closed
* A queue that is always closed
*/
public static final OperationsQueue CLOSED_QUEUE = new OperationsQueue() {
@Override
Expand Down
Expand Up @@ -11,7 +11,7 @@
import org.hibernate.annotations.common.AssertionFailure;

/**
* Represents the key used to link a property value and the id of it's owning entity
* Represents the key used to link a property value and the id of its owning entity
*
* @author Emmanuel Bernard
* @author Sanne Grinovero
Expand Down
Expand Up @@ -51,7 +51,7 @@
*/
@SkipByGridDialect(
value = { GridDialectType.CASSANDRA },
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support uniq constraint even on primary key except by explicit/slow CAS use"
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support unique constraints even on primary key except by explicit/slow CAS use"
)
public class CompensationSpiJpaTest extends JpaTestCase {

Expand Down
Expand Up @@ -54,7 +54,7 @@
*/
@SkipByGridDialect(
value = { GridDialectType.CASSANDRA },
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support uniq constraint even on primary key except by explicit/slow CAS use"
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support unique constraints even on primary key except by explicit/slow CAS use"
)
public class CompensationSpiTest extends OgmTestCase {

Expand Down
Expand Up @@ -117,7 +117,7 @@ public void testPersistEmbeddedWithNullEmbeddedList() throws Exception {

transaction = session.beginTransaction();
AccountWithPhone loadedUser = (AccountWithPhone) session.get( AccountWithPhone.class, wombatSoftware.getId() );
assertThat( loadedUser ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedUser ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
// It is not null because of the list of elements
assertThat( loadedUser.getPhoneNumber() ).isNotNull();
assertThat( loadedUser.getPhoneNumber().getMain() ).isNull();
Expand Down Expand Up @@ -148,7 +148,7 @@ public void testPersistWithEmbeddedList() throws Exception {

transaction = session.beginTransaction();
AccountWithPhone loadedUser = (AccountWithPhone) session.get( AccountWithPhone.class, account.getId() );
assertThat( loadedUser ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedUser ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
assertThat( loadedUser.getPhoneNumber() ).isNotNull();
assertThat( loadedUser.getPhoneNumber().getMain() ).isEqualTo( account.getPhoneNumber().getMain() );
assertThat( loadedUser.getPhoneNumber().getAlternatives() ).containsOnly(
Expand Down Expand Up @@ -188,7 +188,7 @@ public void testPersistWithListEmbeddedInNestedComponent() throws Exception {

transaction = session.beginTransaction();
Order loadedOrder = (Order) session.get( Order.class, "order-1" );
assertThat( loadedOrder ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedOrder ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
assertThat( loadedOrder.getShippingAddress() ).isNotNull();
assertThat( loadedOrder.getShippingAddress().getPhone() ).isNotNull();
assertThat( loadedOrder.getShippingAddress().getPhone().getMain() ).isEqualTo( "+1-222-555-0111" );
Expand Down
Expand Up @@ -103,7 +103,7 @@ public void testNestedEmbeddable() {
// read back nested embeddable
transaction = session.beginTransaction();
loadedAccount = (Account) session.get( Account.class, account.getLogin() );
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
assertThat( loadedAccount.getHomeAddress() ).isNotNull();
assertThat( loadedAccount.getHomeAddress().getCity() ).isEqualTo( "Lima" );
assertThat( loadedAccount.getHomeAddress().getType() ).isNotNull();
Expand Down Expand Up @@ -148,7 +148,7 @@ public void testNestedEmbeddedWithNullProperties() {
// read back nested embedded and set regular embedded to null
transaction = session.beginTransaction();
loadedAccount = (Account) session.get( Account.class, account.getLogin() );
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
assertThat( loadedAccount.getHomeAddress() ).isNotNull();
assertThat( loadedAccount.getHomeAddress().getType() ).isNull();
loadedAccount.setHomeAddress( null );
Expand All @@ -158,7 +158,7 @@ public void testNestedEmbeddedWithNullProperties() {
// read back embedded
transaction = session.beginTransaction();
loadedAccount = (Account) session.get( Account.class, account.getLogin() );
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddedables" ).isNotNull();
assertThat( loadedAccount ).as( "Cannot load persisted object with nested embeddables" ).isNotNull();
assertThat( loadedAccount.getHomeAddress() ).isNull();
session.delete( loadedAccount );
transaction.commit();
Expand Down
Expand Up @@ -27,7 +27,7 @@
*/
@SkipByGridDialect(
value = { GridDialectType.CASSANDRA },
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support uniq constraint even on primary key except by explicit/slow CAS use"
comment = "Cassandra always upserts, doesn't read-lock before write, doesn't support unique constraints even on primary key except by explicit/slow CAS use"
)
public class DuplicateIdDetectionTest extends JpaTestCase {
EntityManager em;
Expand Down
Expand Up @@ -418,7 +418,7 @@ private DBObject insertDBObject(EntityKeyMetadata entityKeyMetadata, Tuple tuple
}

/**
* Creates a dbObject that can be pass to the mongoDB batch insert function
* Creates a DBObject that can be passed to the MongoDB batch insert function
*/
private static DBObject objectForInsert(Tuple tuple, DBObject dbObject) {
MongoDBTupleSnapshot snapshot = (MongoDBTupleSnapshot) tuple.getSnapshot();
Expand Down Expand Up @@ -474,11 +474,11 @@ private static DBObject objectForUpdate(Tuple tuple, DBObject idObject, TupleCon
}
}
/*
* Needed because in case of object with only an ID field
* Needed because in case of an object with only an ID field
* the "_id" won't be persisted properly.
* With this adjustment, it will work like this:
* if the object (from snapshot) doesn't exist so create the one represented by updater
* so if at this moment the "_id" is not enforce properly an ObjectID will be created by the server instead
* if the object (from snapshot) doesn't exist, create the one represented by updater
* so if at this moment the "_id" is not enforced properly, an ObjectID will be created by the server instead
* of the custom id
*/
if ( updater.size() == 0 ) {
Expand Down

0 comments on commit b429a08

Please sign in to comment.