GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: the precedence of + is higher than >> (#16312) · netty/netty@e104c6f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • transport-classes-kqueue/src/main/java/io/netty/channel/kqueue
    • KQueueEventArray.java
    • NativeLongArray.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueEventArray.java‎

Copy file name to clipboardExpand all lines: transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/KQueueEventArray.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private void reallocIfNeeded() {
9999
*/
100100
void realloc(boolean throwIfFail) {
101101
// Double the capacity while it is "sufficiently small", and otherwise increase by 50%.
102-
int newLength = capacity <= 65536 ? capacity << 1 : capacity + capacity >> 1;
102+
int newLength = capacity <= 65536 ? capacity << 1 : capacity + (capacity >> 1);
103103

104104
try {
105105
int newCapacity = calculateBufferCapacity(newLength);
Collapse file

‎transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/NativeLongArray.java‎

Copy file name to clipboardExpand all lines: transport-classes-kqueue/src/main/java/io/netty/channel/kqueue/NativeLongArray.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ private long memoryOffset(int index) {
8888
private void reallocIfNeeded() {
8989
if (size == capacity) {
9090
// Double the capacity while it is "sufficiently small", and otherwise increase by 50%.
91-
int newLength = capacity <= 65536 ? capacity << 1 : capacity + capacity >> 1;
91+
int newLength = capacity <= 65536 ? capacity << 1 : capacity + (capacity >> 1);
9292
int newCapacity = calculateBufferCapacity(newLength);
9393
CleanableDirectBuffer buffer = Buffer.allocateDirectBufferWithNativeOrder(newCapacity);
9494
// Copy over the old content of the memory and reset the position as we always act on the buffer as if

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.