[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[News.eclipse.modeling.mddi] Re: Getting a NullPointerException during Deserialization

Hello

Thank you for reporting this bug.

We have fixed this bug.
Please use the latest code from the CVS repository.

Or replace the methode dereference(...), with this new code



public Object dereference(
DeserializedModel[] data, Parameter p, ModelElementReference[] refs) {
Vector v = new Vector();
for(int i=0; i<refs.length; i++ ) {
String uri = refs[i].getUri();
String ref = refs[i].getRef();
boolean foundResource = false;
for(int j=0; j<data.length && !foundResource; j++) {
if(data[j].getUri().equals(uri)) {
foundResource = true;
Resource r = (Resource) data[j].getValue();
if(r!=null) {
EObject eo = null;
eo = r.getEObject(ref);
if(eo!=null) {
v.add(eo);
} else {
logger.error("Fragment Not Found " +uri +", "+ ref); }
} else {
logger.error("Resource with URI " + uri +" is null.");
}
} }
if(!foundResource) {
logger.error("Resource Not Found " + uri);
}
}
return v;
}



Best regards,

----------------------------
Prawee SRIPLAKICH
LIP6 - Université Pierre et Marie Curie Office C1133
8, rue du Capitaine Scott, 75015 Paris - France
Tel: +33 (0) 1 44 27 88 61
Fax : +33 (0) 1 44 27 87 71


http://www-src.lip6.fr/homepages/Prawee.Sriplakich/
----------------------------