Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:33
Dimitar Stamenov is currently offline Dimitar StamenovFriend
Messages: 18
Registered: July 2009
Junior Member
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 Apr 19 23:19:51 GMT 2024

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

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

Back to the top