Skip to content

Commit

Permalink
Issue #7772 was fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii0lomakin committed Oct 24, 2017
1 parent 83a2b9b commit 38df3e9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private Object getLabel(final OrientBaseGraph graph, final OIdentifiable iCurren
final ODocument rec = iCurrentRecord.getRecord();

OClass klass = ODocumentInternal.getImmutableSchemaClass(rec);
if (klass == null && ODatabaseRecordThreadLocal.INSTANCE.getIfDefined() != null) {
ODatabaseRecordThreadLocal.INSTANCE.getIfDefined().getMetadata().reload();
if (klass == null && ODatabaseRecordThreadLocal.instance().getIfDefined() != null) {
ODatabaseRecordThreadLocal.instance().getIfDefined().getMetadata().reload();
klass = rec.getSchemaClass();
}
if (klass.isVertexType()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ protected static OrientEdge getEdge(final OrientBaseGraph graph, final ODocument
return null;

OClass klass = ODocumentInternal.getImmutableSchemaClass(fieldRecord);
if (klass == null && ODatabaseRecordThreadLocal.INSTANCE.getIfDefined() != null) {
ODatabaseRecordThreadLocal.INSTANCE.getIfDefined().getMetadata().reload();
if (klass == null && ODatabaseRecordThreadLocal.instance().getIfDefined() != null) {
ODatabaseRecordThreadLocal.instance().getIfDefined().getMetadata().reload();
klass = fieldRecord.getSchemaClass();
}

Expand Down Expand Up @@ -1165,8 +1165,8 @@ private void addSingleVertex(final ODocument doc, final OMultiCollectionIterator

final ODocument fieldRecord = ((OIdentifiable) fieldValue).getRecord();
OClass klass = ODocumentInternal.getImmutableSchemaClass(fieldRecord);
if (klass == null && ODatabaseRecordThreadLocal.INSTANCE.getIfDefined() != null) {
ODatabaseRecordThreadLocal.INSTANCE.getIfDefined().getMetadata().reload();
if (klass == null && ODatabaseRecordThreadLocal.instance().getIfDefined() != null) {
ODatabaseRecordThreadLocal.instance().getIfDefined().getMetadata().reload();
klass = fieldRecord.getSchemaClass();
}
if (klass.isVertexType()) {
Expand Down
8 changes: 4 additions & 4 deletions graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertexIterator.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public Vertex createGraphElement(final Object iObject) {
final OClass klass;
if (ODocumentInternal.getImmutableSchemaClass(value) != null) {
klass = ODocumentInternal.getImmutableSchemaClass(value);
} else if (ODatabaseRecordThreadLocal.INSTANCE.getIfDefined() != null) {
ODatabaseRecordThreadLocal.INSTANCE.getIfDefined().getMetadata().reload();
} else if (ODatabaseRecordThreadLocal.instance().getIfDefined() != null) {
ODatabaseRecordThreadLocal.instance().getIfDefined().getMetadata().reload();
klass = value.getSchemaClass();
} else {
throw new IllegalStateException("Invalid content found between connections: " + value);
Expand Down Expand Up @@ -150,8 +150,8 @@ private boolean isVertex(final OIdentifiable iObject) {

final OIdentifiable v;
OClass klass = ODocumentInternal.getImmutableSchemaClass(value);
if (klass == null && ODatabaseRecordThreadLocal.INSTANCE.getIfDefined() != null) {
ODatabaseRecordThreadLocal.INSTANCE.getIfDefined().getMetadata().reload();
if (klass == null && ODatabaseRecordThreadLocal.instance().getIfDefined() != null) {
ODatabaseRecordThreadLocal.instance().getIfDefined().getMetadata().reload();
klass = value.getSchemaClass();
}
if (klass.isVertexType()) {
Expand Down

0 comments on commit 38df3e9

Please sign in to comment.