Skip to Content.
Sympa Menu

mace-opensaml-users - RE: bug in constructing objects using InputStream

Subject: OpenSAML user discussion

List archive

RE: bug in constructing objects using InputStream


Chronological Thread 
  • From: "Nick Laqua" <>
  • To: "Scott Cantor" <>, <>
  • Subject: RE: bug in constructing objects using InputStream
  • Date: Fri, 14 Mar 2003 17:18:01 +0100

Yes, that's correct, the derived object isn't constructed yet at that level
;-(((...also applies to other classes like SAMLAssertion (Collection
statements).

the solution might be even more complex, as the super constructor always has
to be always the first call within the original constructor, so it might be
impossible to initialize before that as the damage is done within the super
constructor (but I am not totally sure)

Nick



-----Original Message-----
From: Scott Cantor
[mailto:]
Sent: Friday, March 14, 2003 5:10 PM
To: Nick Laqua;

Subject: RE: bug in constructing objects using InputStream


> When constructing a SAMLRequest using an InputStream, the
> super class SAMLObject calls the "virtual" polymorphic method
> fromDOM without the private members being initialized (e.g.
> respondWiths).

IOW, despite the fact that in Java when you call a virtual function from a
constructor, it calls the derived version, it still
hasn't constructed the object at that level yet?

Ugh.

In C++, the behavior is explicit that you don't expect the overridden version
to get called from the base, since the subclass isn't
constructed yet, but since Java calls the subclass version of the method, I
assumed it did the right thing to make that viable.

I presume the fix is to initialize explicitly in the constructor(s).

-- Scott

---------------------------------------------------mace-opensaml-users-+
For list utilities, archives, subscribe, unsubscribe, etc. please visit the
ListProc web interface at

http://archives.internet2.edu/

---------------------------------------------------mace-opensaml-users--




Archive powered by MHonArc 2.6.16.

Top of Page