Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 28861 invoked from network); 1 Apr 2009 16:17:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Apr 2009 16:17:00 -0000 Received: (qmail 4138 invoked by uid 500); 1 Apr 2009 16:17:00 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 4054 invoked by uid 500); 1 Apr 2009 16:17:00 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 4044 invoked by uid 99); 1 Apr 2009 16:17:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 16:17:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2009 16:16:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 49E49238896D; Wed, 1 Apr 2009 16:16:37 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r760948 - in /cxf/trunk: api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java Date: Wed, 01 Apr 2009 16:16:36 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090401161637.49E49238896D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Apr 1 16:16:35 2009 New Revision: 760948 URL: http://svn.apache.org/viewvc?rev=760948&view=rev Log: Put back the setElement call as SMX is using it. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java?rev=760948&r1=760947&r2=760948&view=diff ============================================================================== --- cxf/trunk/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java Wed Apr 1 16:16:35 2009 @@ -44,7 +44,7 @@ private String systemId; // Avoid re-serializing all the time. Particularly as a cached WSDL will // hold a reference to the element. - private SoftReference cachedElement = new SoftReference(null); + private SoftReference cachedElement; public SchemaInfo(String namespaceUri) { this(namespaceUri, false, false); @@ -75,13 +75,17 @@ this.namespaceUri = nsUri; } + public synchronized void setElement(Element el) { + cachedElement = new SoftReference(el); + } + /** * Build and return a DOM tree for this schema. * @return */ public synchronized Element getElement() { // if someone recently used this DOM tree, take advantage. - Element element = cachedElement.get(); + Element element = cachedElement == null ? null : cachedElement.get(); if (element != null) { return element; } Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java?rev=760948&r1=760947&r2=760948&view=diff ============================================================================== --- cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java (original) +++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java Wed Apr 1 16:16:35 2009 @@ -126,6 +126,7 @@ SchemaInfo schemaInfo = new SchemaInfo(xmlSchema.getTargetNamespace()); schemaInfo.setSchema(xmlSchema); schemaInfo.setSystemId(systemId); + schemaInfo.setElement(schemaElem); schemaInfos.add(schemaInfo); schemaCount++; }