Skip to content

Commit 996b573

Browse files
committed
add a few comments
1 parent 8c5c516 commit 996b573

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jmx-scraper/src/integrationTest/java/io/opentelemetry/contrib/jmxscraper/TestAppContainer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ public void start() {
150150
properties.put("com.sun.management.jmxremote.rmi.port", Integer.toString(jmxRmiPort));
151151
if (jmxRmiPort == jmxPort) {
152152
// making it harder to attempt using the same port
153+
// doing so results in a "port busy" error which can be confusing
153154
throw new IllegalStateException(
154155
"RMI with SSL registry requires a distinct port from JMX: " + jmxRmiPort);
155156
}
@@ -159,8 +160,10 @@ public void start() {
159160
}
160161

161162
if (pwd == null) {
163+
// no authentication
162164
properties.put("com.sun.management.jmxremote.authenticate", "false");
163165
} else {
166+
// authentication enabled
164167
properties.put("com.sun.management.jmxremote.authenticate", "true");
165168

166169
Path pwdFile = createPwdFile(login, pwd);
@@ -172,6 +175,7 @@ public void start() {
172175
properties.put("com.sun.management.jmxremote.access.file", "/jmx.access");
173176
}
174177

178+
// add optional key and trust stores
175179
addKeyStore(keyStore, keyStorePassword, /* keyStore= */ true, properties);
176180
addKeyStore(trustStore, trustStorePassword, /* keyStore= */ false, properties);
177181

0 commit comments

Comments
 (0)