A DESCRIPTION OF THE PROBLEM :
One uses the ObjectName constructor with domain/map. One value needs quoting but is not.
The ObjectName instantiation succeed then an MBean is registered with this name.
Connect JConsole to the server, the connection will fail, the MBean name desisrialization fails on the client side.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("objname2.ser"));
Hashtable keys = new Hashtable<>();
keys.put("worker", "Remoting \"cli_client\"");
ObjectName obj = new ObjectName("org.xnio", keys);
oos.writeObject(obj);
// Uncomment this line and the construction will fail.
//ObjectName obj2 = new ObjectName("org.xnio:worker=Remoting \"cli_client\"");
ObjectInputStream iis = new ObjectInputStream(new FileInputStream("objname2.ser"));
// Will fail at deserialization time.
ObjectName objname = (ObjectName) iis.readObject();
System.out.println(objname);
FREQUENCY : always
One uses the ObjectName constructor with domain/map. One value needs quoting but is not.
The ObjectName instantiation succeed then an MBean is registered with this name.
Connect JConsole to the server, the connection will fail, the MBean name desisrialization fails on the client side.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("objname2.ser"));
Hashtable keys = new Hashtable<>();
keys.put("worker", "Remoting \"cli_client\"");
ObjectName obj = new ObjectName("org.xnio", keys);
oos.writeObject(obj);
// Uncomment this line and the construction will fail.
//ObjectName obj2 = new ObjectName("org.xnio:worker=Remoting \"cli_client\"");
ObjectInputStream iis = new ObjectInputStream(new FileInputStream("objname2.ser"));
// Will fail at deserialization time.
ObjectName objname = (ObjectName) iis.readObject();
System.out.println(objname);
FREQUENCY : always