You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[JENKINS-49994] Report uses of anonymous classes in outgoing Remoting packets #1313
JENKINS-49795 issues warnings about both reads and writes of anonymous (and similar) classes for XStream, because XStream2.BlacklistedTypesConverter calls ClassFilter.DEFAULT in both directions. But currently these warnings are issued only for incoming Remoting packets—either slave → master callables, or return types of master → slave callables. The much more common case of anonymous (etc.) classes being used for master → slave callables is not detected.
JENKINS-49795 issues warnings about both reads and writes of anonymous (and similar) classes for XStream, because XStream2.BlacklistedTypesConverter calls ClassFilter.DEFAULT in both directions. But currently these warnings are issued only for incoming Remoting packets—either slave → master callables, or return types of master → slave callables. The much more common case of anonymous (etc.) classes being used for master → slave callables is not detected.
Note that this will issue warnings when encountering anonymous (etc.) classes either in Remoting or XStream. For XStream cases, these are always plainly bugs. For Remoting, it is not necessarily a problem—RemoteClassLoader ensures that the same bytecode version is used on either side—but there are still reasons to really prefer named classes:
It is all too easy to accidentally pull in crazy stuff via Callable this$0 (jenkinsci/packer-plugin#22 for just the most recent example). If you are lucky, all that implicit data will be small and (safely) Serializable.
Note that this will issue warnings when encountering anonymous (etc.) classes either in Remoting or XStream. For XStream cases, these are always plainly bugs. For Remoting, it is not necessarily a problem—RemoteClassLoader ensures that the same bytecode version is used on either side—but there are still reasons to really prefer named classes:
It is all too easy to accidentally pull in crazy stuff via Callable this$0 (jenkinsci/packer-plugin#22 for just the most recent example). If you are lucky, all that implicit data will be small and (safely) Serializable.
Activity
jenkins-infra-bot commentedon Mar 7, 2018
Remote links associated with this issue:
jenkins-infra-bot commentedon Mar 7, 2018
Raw content of original comment:
Code changed in jenkins
User: Jesse Glick
Path:
content/redirect/serialization-of-anonymous-classes.adoc
http://jenkins-ci.org/commit/jenkins.io/11e02be65d669320d023a97bbefd3eb7f3ecbef9
Log:
JENKINS-49994Getting a redirect in place.jenkins-infra-bot commentedon Mar 7, 2018
Raw content of original comment:
Code changed in jenkins
User: R. Tyler Croy
Path:
content/redirect/serialization-of-anonymous-classes.adoc
http://jenkins-ci.org/commit/jenkins.io/30592f98d9aa1a982f39220013e60286e6f7c1b5
Log:
Merge pull request #1439 from jglick/anonymous-warning-
JENKINS-49994JENKINS-49994Set up a redirect for messages about serialization of anonymous classesCompare: jenkins-infra/jenkins.io@a178b2b...30592f9
jenkins-infra-bot commentedon Mar 18, 2018
Raw content of original comment:
Motivation explained in jenkinsci/jenkins#3312 (comment)
jenkins-infra-bot commentedon Mar 19, 2018
Raw content of original comment:
Merged into core towards 2.112.
jenkins-infra-bot commentedon Nov 25, 2025
[Original
relates_tofrom Jira: JENKINS-53619]