Changed Iterator::next() to return const&
authorScott Cantor <cantor.2@osu.edu>
Mon, 19 Aug 2002 16:11:59 +0000 (16:11 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 19 Aug 2002 16:11:59 +0000 (16:11 +0000)
eduPerson/ScopedAttribute.cpp
shib/ShibPOSTProfile.cpp
shib/ShibPOSTProfileFactory.cpp
shibtest/shibtest.cpp

index 3096017..794ec62 100644 (file)
@@ -80,7 +80,7 @@ ScopedAttribute::ScopedAttribute(const XMLCh* name, const XMLCh* ns, const XMLCh
         m_defaultScope=defaultScope;
 
     while (scopes.hasNext())
-        m_values.push_back(*scopes.next());
+        m_values.push_back(scopes.next());
 }
 
 ScopedAttribute::ScopedAttribute(IDOM_Element* e) : SAMLAttribute(e)
@@ -119,7 +119,7 @@ bool ScopedAttribute::accept(IDOM_Element* e) const
         this_scope=m_defaultScope.c_str();
 
     while (domains.hasNext())
-        if (*domains.next()==this_scope)
+        if (domains.next()==this_scope)
             return true;
     return false;
 }
index bdb7414..2b638e2 100644 (file)
@@ -73,7 +73,7 @@ ShibPOSTProfile::ShibPOSTProfile(const Iterator<const XMLCh*>& policies, IOrigin
     m_receiver = XMLString::replicate(receiver);
 
     while (policies.hasNext())
-        m_policies.push_back(XMLString::replicate(*policies.next()));
+        m_policies.push_back(XMLString::replicate(policies.next()));
 }
 
 ShibPOSTProfile::ShibPOSTProfile(const Iterator<const XMLCh*>& policies, const XMLCh* issuer)
@@ -85,7 +85,7 @@ ShibPOSTProfile::ShibPOSTProfile(const Iterator<const XMLCh*>& policies, const X
     m_issuer = XMLString::replicate(issuer);
 
     while (policies.hasNext())
-        m_policies.push_back(XMLString::replicate(*policies.next()));
+        m_policies.push_back(XMLString::replicate(policies.next()));
 }
 
 ShibPOSTProfile::~ShibPOSTProfile()
@@ -137,7 +137,7 @@ SAMLResponse* ShibPOSTProfile::accept(const XMLByte* buf)
     Iterator<xstring> hsNames = m_mapper->getHandleServiceNames(originSite);
     bool bFound = false;
     while (!bFound && hsNames.hasNext())
-        if (!XMLString::compareString(hsNames.next()->c_str(),handleService))
+        if (!XMLString::compareString(hsNames.next().c_str(),handleService))
             bFound = true;
     if (!bFound)
         throw SAMLException(SAMLException::RESPONDER, "ShibPOSTProfile::accept() detected an untrusted HS for the origin site");
@@ -179,7 +179,7 @@ SAMLResponse* ShibPOSTProfile::prepare(const XMLCh* recipient,
     SAMLResponse* r = SAMLPOSTProfile::prepare(recipient,m_issuer,Iterator<const XMLCh*>(m_policies),name,
                                                nameQualifier,NULL,subjectIP,authMethod,authDateTime,bindings);
     if (assertionKey)
-        (*r->getAssertions().next())->sign(m_algorithm,*assertionKey,assertionCert);
+        (r->getAssertions().next())->sign(m_algorithm,*assertionKey,assertionCert);
 
     r->sign(m_algorithm,responseKey,responseCert);
 
index 2a8451a..c946bba 100644 (file)
@@ -67,7 +67,7 @@ using namespace std;
 ShibPOSTProfile* ShibPOSTProfileFactory::getInstance(const Iterator<const XMLCh*>& policies, IOriginSiteMapper* mapper,
                                                      const XMLCh* receiver, int ttlSeconds)
 {
-    if (policies.size()!=1 || XMLString::compareString(Constants::POLICY_CLUBSHIB,*policies.next()))
+    if (policies.size()!=1 || XMLString::compareString(Constants::POLICY_CLUBSHIB,policies.next()))
         return NULL;
     policies.reset();
     return new ClubShibPOSTProfile(policies,mapper,receiver,ttlSeconds);
@@ -75,7 +75,7 @@ ShibPOSTProfile* ShibPOSTProfileFactory::getInstance(const Iterator<const XMLCh*
 
 ShibPOSTProfile* ShibPOSTProfileFactory::getInstance(const Iterator<const XMLCh*>& policies, const XMLCh* issuer)
 {
-    if (policies.size()!=1 || XMLString::compareString(Constants::POLICY_CLUBSHIB,*policies.next()))
+    if (policies.size()!=1 || XMLString::compareString(Constants::POLICY_CLUBSHIB,policies.next()))
         return NULL;
     policies.reset();
     return new ClubShibPOSTProfile(policies,issuer);
index bac28d2..a40fc06 100644 (file)
@@ -163,7 +163,7 @@ int main(int argc,char* argv[])
         Iterator<SAMLAssertion*> i=resp->getAssertions();
         if (i.hasNext())
         {
-            SAMLAssertion* a=*i.next();
+            SAMLAssertion* a=i.next();
             cout << "Issuer: "; xmlout(cout,a->getIssuer()); cout << endl;
             const XMLDateTime* exp=a->getNotOnOrAfter();
             cout << "Expires: ";
@@ -176,7 +176,7 @@ int main(int argc,char* argv[])
             Iterator<SAMLStatement*> j=a->getStatements();
             if (j.hasNext())
             {
-                SAMLAttributeStatement* s=dynamic_cast<SAMLAttributeStatement*>(*j.next());
+                SAMLAttributeStatement* s=dynamic_cast<SAMLAttributeStatement*>(j.next());
                 if (s)
                 {
                     const SAMLSubject* sub=s->getSubject();
@@ -186,7 +186,7 @@ int main(int argc,char* argv[])
                     Iterator<SAMLAttribute*> attrs=s->getAttributes();
                     while (attrs.hasNext())
                     {
-                        SAMLAttribute* attr=*attrs.next();
+                        SAMLAttribute* attr=attrs.next();
                         cout << "Attribute Name: "; xmlout(cout,attr->getName()); cout << endl;
                         cout << "Attribute Type: {";
                         xmlout(cout,attr->getType()->getNamespaceURI());
@@ -198,7 +198,7 @@ int main(int argc,char* argv[])
                         while (vals.hasNext())
                         {
                             cout << "Attribute Value: ";
-                            xmlout(cout,vals.next()->c_str());
+                            xmlout(cout,vals.next().c_str());
                             cout << endl;
                         }
                     }