[ 
https://issues.apache.org/jira/browse/IGNITE-5046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131280#comment-18131280
 ] 

Zhang Zhenhao commented on IGNITE-5046:
---------------------------------------

Verified on current master (2.19.0-SNAPSHOT, commit e453ac868c, JDK 17, 
2026-10-24) that this
is already fixed.

TcpDiscoverySpi.toString() now prints all the fields mentioned in this ticket 
(locAddr, locPort,
locPortRange, netTimeout and others), for example:

TcpDiscoverySpi [locAddr=null, addrRslvr=null, ipFinder=null, 
addressFilter=null, sockTimeout=0,
ackTimeout=0, netTimeout=5000, joinTimeout=0, threadPri=10, 
metricsUpdateFreq=0, topHistSize=1000,
connRecoveryTimeout=10000, locNodeVer=null, locNode=null, cfgNodeId=null, 
locHost=null,
gridStartTime=0, marsh=null, locPort=47500, locPortRange=10, reconCnt=10, 
reconDelay=2000,
statsPrintFreq=0, maxAckTimeout=600000, soLinger=0, ipFinderCleanFreq=60000, 
nodeAuth=null,
sslSrvSockFactory=null, sslSockFactory=null, sslEnable=false, impl=null,
clientReconnectDisabled=false, skipAddrsRandomization=false]

(locPort, locPortRange and netTimeout were set explicitly before calling 
toString(); locAddr was
left null, but the field itself is printed as well.)

Root cause of the change: IGNITE-27709 (PR #12677, commit 90be2c1faa) removed 
the
Modifier.isPrivate() requirement from GridToStringBuilder.addField(), so 
protected fields are now
included in toString() by default.

I suggest resolving this ticket as Fixed. The stale PR #1890 can be closed as 
superseded.

> TcpDiscoverySpi.toString() method miss some fields.
> ---------------------------------------------------
>
>                 Key: IGNITE-5046
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5046
>             Project: Ignite
>          Issue Type: Bug
>          Components: general
>    Affects Versions: 1.9
>            Reporter: Andrey Mashenkov
>            Priority: Minor
>              Labels: newbie
>
> We have a number of protected fields that is missed by toString method.
> Looks like we should annotate these fields with @GridToStringInclude.
> locAddr, locPort, locPortRange, netTimeout and others.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to