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
Received once upon a time...
Check if this is still needed.
I got the same issue as listed in 6,7,8,10,15,16 not "able to handle special characters". It needed a small fix that I could figure : Encoding the $ref attribute in JSON response. This is some thing that is already there, but is not working. Below is the existing code. The first two "if clauses" never come true as item is comming an instance of String Class, so I added the url encode in the else clause. It worked for me, but we need to find out in which cases the first two cases will become true.
AbstractTemplateResource.java
if (item instanceof MBeanAttributeInfo)
{
ref.put("$ref", encoderBean.encode(((MBeanAttributeInfo) item).getName()) + "/");
}
else if (item instanceof Map && ((Map) item).containsKey("declaration"))
{
ref.put("$ref", ((Map) item).get("declaration").toString());
}
else
{
ref.put("$ref",encoderBean.encode(item.toString()) + "/"); // This is the fix I added
}
Please find the patch attached and the compiled jar for a quick test.
I think the following defects 6,7,8,10,15,16 are refering to same issue. So all of them can tryout this fix I think
Received once upon a time...
Check if this is still needed.
I got the same issue as listed in 6,7,8,10,15,16 not "able to handle special characters". It needed a small fix that I could figure : Encoding the $ref attribute in JSON response. This is some thing that is already there, but is not working. Below is the existing code. The first two "if clauses" never come true as item is comming an instance of String Class, so I added the url encode in the else clause. It worked for me, but we need to find out in which cases the first two cases will become true.
AbstractTemplateResource.java
if (item instanceof MBeanAttributeInfo)
{
ref.put("$ref", encoderBean.encode(((MBeanAttributeInfo) item).getName()) + "/");
}
else if (item instanceof Map && ((Map) item).containsKey("declaration"))
{
ref.put("$ref", ((Map) item).get("declaration").toString());
}
else
{
ref.put("$ref",encoderBean.encode(item.toString()) + "/"); // This is the fix I added
}
Please find the patch attached and the compiled jar for a quick test.
I think the following defects 6,7,8,10,15,16 are refering to same issue. So all of them can tryout this fix I think
The text was updated successfully, but these errors were encountered: