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 — common: initialize SystemTicker at runtime in native images · netty/netty@2c957f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • common/src
    • main/resources/META-INF/native-image/io.netty/netty-common
      • native-image.properties
    • test/java/io/netty/util/concurrent
      • SystemTickerNativeImageConfigurationTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎common/src/main/resources/META-INF/native-image/io.netty/netty-common/native-image.properties‎

Copy file name to clipboardExpand all lines: common/src/main/resources/META-INF/native-image/io.netty/netty-common/native-image.properties
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Note: This file is overridden by graalvm-reachability-metadata
1616

17-
Args = --initialize-at-run-time=io.netty.util.AbstractReferenceCounted,io.netty.util.concurrent.GlobalEventExecutor,io.netty.util.concurrent.ImmediateEventExecutor,io.netty.util.concurrent.ScheduledFutureTask,io.netty.util.internal.ThreadLocalRandom \
17+
Args = --initialize-at-run-time=io.netty.util.AbstractReferenceCounted,io.netty.util.concurrent.GlobalEventExecutor,io.netty.util.concurrent.ImmediateEventExecutor,io.netty.util.concurrent.ScheduledFutureTask,io.netty.util.concurrent.SystemTicker,io.netty.util.internal.ThreadLocalRandom \
1818
--initialize-at-run-time=io.netty.util.NetUtilSubstitutions$NetUtilLocalhost4LazyHolder \
1919
--initialize-at-run-time=io.netty.util.NetUtilSubstitutions$NetUtilLocalhost6LazyHolder \
2020
--initialize-at-run-time=io.netty.util.NetUtilSubstitutions$NetUtilLocalhostLazyHolder \
Collapse file

‎common/src/test/java/io/netty/util/concurrent/SystemTickerNativeImageConfigurationTest.java‎

Copy file name to clipboard
+46Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright 2026 The Netty Project
3+
*
4+
* The Netty Project licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
package io.netty.util.concurrent;
17+
18+
import org.junit.jupiter.api.Test;
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.util.Arrays;
23+
import java.util.Properties;
24+
25+
import static org.junit.jupiter.api.Assertions.assertNotNull;
26+
import static org.junit.jupiter.api.Assertions.assertTrue;
27+
28+
class SystemTickerNativeImageConfigurationTest {
29+
30+
@Test
31+
void systemTickerIsInitializedAtRuntime() throws IOException {
32+
Properties properties = new Properties();
33+
try (InputStream input = getClass().getClassLoader().getResourceAsStream(
34+
"META-INF/native-image/io.netty/netty-common/native-image.properties")) {
35+
assertNotNull(input);
36+
properties.load(input);
37+
}
38+
39+
String args = properties.getProperty("Args");
40+
assertNotNull(args);
41+
assertTrue(Arrays.stream(args.split("\\s+"))
42+
.filter(argument -> argument.startsWith("--initialize-at-run-time="))
43+
.anyMatch(argument -> Arrays.asList(argument.substring("--initialize-at-run-time=".length())
44+
.split(",")).contains(SystemTicker.class.getName())));
45+
}
46+
}

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.