Skip to content

Commit 859a784

Browse files
bigmontzfbiville
andcommitted
Apply suggestions from code review
Co-authored-by: Florent Biville <[email protected]>
1 parent 537c102 commit 859a784

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

driver/src/main/java/org/neo4j/driver/internal/messaging/BoltProtocolVersion.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public BoltProtocolVersion( int majorVersion, int minorVersion )
3434
public static BoltProtocolVersion fromRawBytes( int rawVersion )
3535
{
3636
int major = rawVersion & 0x000000FF;
37-
int minor = ( rawVersion >> 8 ) & 0x000000FF;
37+
int minor = (rawVersion >> 8) & 0x000000FF;
3838

3939
return new BoltProtocolVersion( major, minor );
4040
}
@@ -55,15 +55,15 @@ public int toInt()
5555
return shiftedMinor | majorVersion;
5656
}
5757

58-
public int toIntRange(BoltProtocolVersion minVersion)
58+
public int toIntRange( BoltProtocolVersion minVersion )
5959
{
60-
if(majorVersion != minVersion.majorVersion)
60+
if ( majorVersion != minVersion.majorVersion )
6161
{
62-
throw new IllegalArgumentException( "Versions should be from the same version" );
62+
throw new IllegalArgumentException( "Versions should be from the same major version" );
6363
}
64-
else if (minorVersion < minVersion.minorVersion)
64+
else if ( minorVersion < minVersion.minorVersion )
6565
{
66-
throw new IllegalArgumentException("Max version should be newest than min version");
66+
throw new IllegalArgumentException( "Max version should be newer than min version" );
6767
}
6868
int range = minorVersion - minVersion.minorVersion;
6969
int shiftedRange = range << 16;

0 commit comments

Comments
 (0)