Getting the below exception which usually comes when we assign a list from a array using Arrays.asList() but i could not see any usage of Arrays in the code where it is being thrown. Moreover the list is initialized using new ArrayList();
protected List getUnmapParam(PPlan pPlan){
List unmappedParams = super.getUnmapParam(pPlan, ord);
PricePlanExt apPP = null;
if (pricePlan.getapID() != null) {
apPP = getCurrentlyItem(pPlan.getID(), errorCodeH);
}
if (apPP != null) {
List billParams = apPP.getBillParams();
for (BillParam billParam : billParams) {
if (billParam.getnameVal().equals("SD")) {
BillUnmapParamType unmappedParamType = getUnMappedType();
Attribute attr = mapSimpleParameter(unmappedParamType, apPP, billParam);
unmappedParams.add(attr);//Here it is being thrown
}
}
}
return unmappedParams;
}
//Super method
protected List getUnmapParameters(Plan pPlan, Ord ord){
return Collections.EMPTY_LIST;
}
The stacktrace:
java.lang.UnsupportedOperationException at
java.util.AbstractList.add(AbstractList.java:148) at
java.util.AbstractList.add(AbstractList.java:108) at
java.som.impl.oshooks.BillingImpl.getUnmapParam(BillingImpl.java:121)
javaorjavax. See the documentation about naming a package.