Skip to content

Commit e07f198

Browse files
committed
Update based on review comments
1 parent f32ab91 commit e07f198

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

driver/src/main/java/org/neo4j/driver/internal/messaging/common/CommonValueUnpacker.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public class CommonValueUnpacker implements ValueUnpacker
9191
public static final byte UNBOUND_RELATIONSHIP = 'r';
9292
public static final byte PATH = 'P';
9393

94-
public static final int NODE_FIELDS = 3;
94+
private static final int NODE_FIELDS = 3;
95+
private static final int RELATIONSHIP_FIELDS = 5;
9596

9697
protected final PackStream.Unpacker unpacker;
9798

@@ -426,6 +427,6 @@ protected int getNodeFields()
426427

427428
protected int getRelationshipFields()
428429
{
429-
return 5;
430+
return RELATIONSHIP_FIELDS;
430431
}
431432
}

driver/src/main/java/org/neo4j/driver/internal/messaging/v5/ValueUnpackerV5.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040

4141
public class ValueUnpackerV5 extends CommonValueUnpacker
4242
{
43+
private static final int NODE_FIELDS = 4;
44+
private static final int RELATIONSHIP_FIELDS = 8;
45+
4346
public ValueUnpackerV5( PackInput input )
4447
{
4548
super( input );
@@ -48,13 +51,13 @@ public ValueUnpackerV5( PackInput input )
4851
@Override
4952
protected int getNodeFields()
5053
{
51-
return 4;
54+
return NODE_FIELDS;
5255
}
5356

5457
@Override
5558
protected int getRelationshipFields()
5659
{
57-
return 8;
60+
return RELATIONSHIP_FIELDS;
5861
}
5962

6063
@Override

driver/src/main/java/org/neo4j/driver/types/Entity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public interface Entity extends MapAccessor
3232
* entities after that. As such, if you want a public identity to use for your entities, attaching an explicit 'id' property or similar persistent and
3333
* unique identifier is a better choice.
3434
*
35-
* @return the id of this entity
35+
* @return the id of this entity, please note that negative values are considered to be invalid and may be returned when storage engine can only provide the
36+
* {@link #elementId()}
3637
* @deprecated superseded by {@link #elementId()}
3738
*/
3839
@Deprecated

0 commit comments

Comments
 (0)