Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Resource.getEObject() method throws exception instead of null
[Teneo] Resource.getEObject() method throws exception instead of null [message #609505] Wed, 22 August 2007 05:33
Eclipse UserFriend
Hi Martin,

When I use the standard EMF model, Resource.getEObject(String objectID)
method returns null if there is no object with the specified objectID.
So the code that I have written relies on that premise.

However Teneo does not return null but throws
StringIndexOutOfBoundsException in the method
JPOXResource.getEObjectByID(). Do you think that it is more reasonable
to change Teneo to return null instead of this exception?

I am sending you the stack trace of the exception.

Regards
Dimitar

Stack trace:
java.lang.StringIndexOutOfBoundsException
at java.lang.String.substring(String.java:1088)
at org.jpox.store.OID.<init>(OID.java:105)
at
org.eclipse.emf.teneo.jpox.resource.JPOXResource.getEObjectB yID(JPOXResource.java:302)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:683)
Previous Topic:Incompatible type requested for parameter field (emf+teneo+jpox)
Next Topic:[Teneo] Resource.getEObject() method throws exception instead of null
Goto Forum:
  


Current Time: Fri Jul 04 10:18:45 EDT 2025

Powered by FUDForum. Page generated in 0.19448 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top