You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2009/10/08 07:35:30 UTC

svn commit: r823026 - in /tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http: HTTPBinding.java HTTPBindingFactory.java HTTPCacheContext.java impl/HTTPBindingImpl.java xml/HTTPBindingProcessor.java

Author: lresende
Date: Thu Oct  8 05:35:29 2009
New Revision: 823026

URL: http://svn.apache.org/viewvc?rev=823026&view=rev
Log:
Minor formatting

Modified:
    tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
    tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
    tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
    tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
    tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java

Modified: tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java?rev=823026&r1=823025&r2=823026&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java (original)
+++ tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBinding.java Thu Oct  8 05:35:29 2009
@@ -30,5 +30,5 @@
  * @version $Rev$ $Date$
 */
 public interface HTTPBinding extends BindingRRB {
-	QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.http");
+    QName TYPE = new QName(SCA11_TUSCANY_NS, "binding.http");
 }

Modified: tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java?rev=823026&r1=823025&r2=823026&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java (original)
+++ tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPBindingFactory.java Thu Oct  8 05:35:29 2009
@@ -25,7 +25,7 @@
  * @version $Rev$ $Date$
  */
 public interface HTTPBindingFactory {
-    
+
     /**
      * Creates a new HTTP binding.
      * @return a new HTTP binding

Modified: tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java?rev=823026&r1=823025&r2=823026&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java (original)
+++ tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/HTTPCacheContext.java Thu Oct  8 05:35:29 2009
@@ -38,173 +38,173 @@
  */
 public class HTTPCacheContext {
     public static final SimpleDateFormat RFC822DateFormat = new SimpleDateFormat( "EEE, dd MMM yyyy HH:mm:ss Z" ); // RFC 822 date time
-    
+
     public boolean enabled;
-	public String eTag;
-	public String lastModified;
-	public Date lastModifiedDate;
-	public boolean ifModifiedSince;
-	public boolean ifUnmodifiedSince;
-	public boolean ifMatch;
-	public boolean ifNoneMatch;
-	public boolean ifRange;
-
-	/**
-	 * An ETag is a unique ID for an item. It changes when
-	 * a field in the item or the update date changes.
-	 * See HTTP specification for how ETags work:
-	 * http://tools.ietf.org/html/rfc2616
-	 * @return the eTag
-	 */
-	public String getETag() {
-		return eTag;
-	}
-	/**
-	 * @param tag the eTag to set
-	 */
-	public void setETag(String tag) {
-		eTag = tag;
-		enabled = true;
-	}
-	/**
-	 * The LastModified date is the time the item was last 
-	 * changed. See HTTP specification for how ETags work:
-	 * http://tools.ietf.org/html/rfc2616
-	 * @return the lastModified
-	 */
-	public String getLastModified() {
-		return lastModified;
-	}
-	/**
-	 * The LastModified date is the time the item was last 
-	 * changed. See HTTP specification for how ETags work:
-	 * http://tools.ietf.org/html/rfc2616
-	 * @return the lastModified
-	 */
-	public Date getLastModifiedAsDate() {
-		return lastModifiedDate;
-	}
-	/**
-	 * @param lastModified the lastModified to set
-	 */
-	public void setLastModified(String lastModified) throws java.text.ParseException {
-		this.lastModified = lastModified;
-		// Catch date formatting on input to help debugging.
-  		lastModifiedDate = RFC822DateFormat.parse( lastModified );
-		enabled = true;
-	}
-	
-	/**
-	 * @param lastModified the lastModified to set
-	 */
-	public void setLastModified(Date updated) {
-		this.lastModified = RFC822DateFormat.format( updated );
-  		lastModifiedDate = updated;
-		enabled = true;
-	}
-	
-	/**
-	 * @return the ifModifedSince
-	 */
-	public boolean isIfModifiedSince() {
-		return ifModifiedSince;
-	}
-	/**
-	 * @param ifModifedSince the ifModifedSince to set
-	 */
-	public void setIfModifiedSince(boolean ifModifiedSince) {
-		this.ifModifiedSince = ifModifiedSince;
-		if ( ifModifiedSince )
-			enabled = true;
-	}
-	/**
-	 * @return the ifUnModifiedSince
-	 */
-	public boolean isIfUnmodifiedSince() {
-		return ifUnmodifiedSince;
-	}
-	/**
-	 * @param ifUnModifiedSince the ifUnModifiedSince to set
-	 */
-	public void setIfUnmodifiedSince(boolean ifUnmodifiedSince) {
-		this.ifUnmodifiedSince = ifUnmodifiedSince;
-		if ( ifUnmodifiedSince )
-			enabled = true;
-	}
-	/**
-	 * @return the ifMatch
-	 */
-	public boolean isIfMatch() {
-		return ifMatch;
-	}
-	/**
-	 * @param ifMatch the ifMatch to set
-	 */
-	public void setIfMatch(boolean ifMatch) {
-		this.ifMatch = ifMatch;
-		if ( ifMatch )
-			enabled = true;
-	}
-	/**
-	 * @return the ifNoneMatch
-	 */
-	public boolean isIfNoneMatch() {
-		return ifNoneMatch;
-	}
-	/**
-	 * @param ifNoneMatch the ifNoneMatch to set
-	 */
-	public void setIfNoneMatch(boolean ifNoneMatch) {
-		this.ifNoneMatch = ifNoneMatch;
-		if ( ifNoneMatch )
-			enabled = true;
-	}
-	/**
-	 * @return the ifRange
-	 */
-	public boolean isIfRange() {
-		return ifRange;
-	}
-	/**
-	 * @param ifRange the ifRange to set
-	 */
-	public void setIfRange(boolean ifRange) {
-		this.ifRange = ifRange;
-		if ( ifRange )
-			enabled = true;
-	}
+    public String eTag;
+    public String lastModified;
+    public Date lastModifiedDate;
+    public boolean ifModifiedSince;
+    public boolean ifUnmodifiedSince;
+    public boolean ifMatch;
+    public boolean ifNoneMatch;
+    public boolean ifRange;
+
+    /**
+     * An ETag is a unique ID for an item. It changes when
+     * a field in the item or the update date changes.
+     * See HTTP specification for how ETags work:
+     * http://tools.ietf.org/html/rfc2616
+     * @return the eTag
+     */
+    public String getETag() {
+        return eTag;
+    }
+    /**
+     * @param tag the eTag to set
+     */
+    public void setETag(String tag) {
+        eTag = tag;
+        enabled = true;
+    }
+    /**
+     * The LastModified date is the time the item was last 
+     * changed. See HTTP specification for how ETags work:
+     * http://tools.ietf.org/html/rfc2616
+     * @return the lastModified
+     */
+    public String getLastModified() {
+        return lastModified;
+    }
+    /**
+     * The LastModified date is the time the item was last 
+     * changed. See HTTP specification for how ETags work:
+     * http://tools.ietf.org/html/rfc2616
+     * @return the lastModified
+     */
+    public Date getLastModifiedAsDate() {
+        return lastModifiedDate;
+    }
+    /**
+     * @param lastModified the lastModified to set
+     */
+    public void setLastModified(String lastModified) throws java.text.ParseException {
+        this.lastModified = lastModified;
+        // Catch date formatting on input to help debugging.
+        lastModifiedDate = RFC822DateFormat.parse( lastModified );
+        enabled = true;
+    }
+
+    /**
+     * @param lastModified the lastModified to set
+     */
+    public void setLastModified(Date updated) {
+        this.lastModified = RFC822DateFormat.format( updated );
+        lastModifiedDate = updated;
+        enabled = true;
+    }
+
+    /**
+     * @return the ifModifedSince
+     */
+    public boolean isIfModifiedSince() {
+        return ifModifiedSince;
+    }
+    /**
+     * @param ifModifedSince the ifModifedSince to set
+     */
+    public void setIfModifiedSince(boolean ifModifiedSince) {
+        this.ifModifiedSince = ifModifiedSince;
+        if ( ifModifiedSince )
+            enabled = true;
+    }
+    /**
+     * @return the ifUnModifiedSince
+     */
+    public boolean isIfUnmodifiedSince() {
+        return ifUnmodifiedSince;
+    }
+    /**
+     * @param ifUnModifiedSince the ifUnModifiedSince to set
+     */
+    public void setIfUnmodifiedSince(boolean ifUnmodifiedSince) {
+        this.ifUnmodifiedSince = ifUnmodifiedSince;
+        if ( ifUnmodifiedSince )
+            enabled = true;
+    }
+    /**
+     * @return the ifMatch
+     */
+    public boolean isIfMatch() {
+        return ifMatch;
+    }
+    /**
+     * @param ifMatch the ifMatch to set
+     */
+    public void setIfMatch(boolean ifMatch) {
+        this.ifMatch = ifMatch;
+        if ( ifMatch )
+            enabled = true;
+    }
+    /**
+     * @return the ifNoneMatch
+     */
+    public boolean isIfNoneMatch() {
+        return ifNoneMatch;
+    }
+    /**
+     * @param ifNoneMatch the ifNoneMatch to set
+     */
+    public void setIfNoneMatch(boolean ifNoneMatch) {
+        this.ifNoneMatch = ifNoneMatch;
+        if ( ifNoneMatch )
+            enabled = true;
+    }
+    /**
+     * @return the ifRange
+     */
+    public boolean isIfRange() {
+        return ifRange;
+    }
+    /**
+     * @param ifRange the ifRange to set
+     */
+    public void setIfRange(boolean ifRange) {
+        this.ifRange = ifRange;
+        if ( ifRange )
+            enabled = true;
+    }
 
     public String toString() {
-    	final String PREDPREFIX = ", predicates=";
-		StringBuffer sb = new StringBuffer(PREDPREFIX);
-		if ( ifMatch || ifNoneMatch || ifModifiedSince || ifUnmodifiedSince || ifRange ) {
-			if ( ifMatch ) {
-				if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
-				sb.append("If-Match");
-			}
-			if ( ifNoneMatch ) {
-				if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
-				sb.append("If-None-Match");
-			}
-			if ( ifModifiedSince ) {
-				if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
-				sb.append("If-Modified-Since");
-			}
-			if ( ifUnmodifiedSince ) {
-				if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
-				sb.append("If-UnModified-Since");
-			}
-			if ( ifRange ) {
-				if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
-				sb.append("If-Range");
-			}
-		} else {
-			sb.append("null");
-		}
-
-		return "eTag=" + eTag + ", lastModified=" + lastModified
-				+ sb.toString();
-	}
+        final String PREDPREFIX = ", predicates=";
+        StringBuffer sb = new StringBuffer(PREDPREFIX);
+        if ( ifMatch || ifNoneMatch || ifModifiedSince || ifUnmodifiedSince || ifRange ) {
+            if ( ifMatch ) {
+                if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+                sb.append("If-Match");
+            }
+            if ( ifNoneMatch ) {
+                if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+                sb.append("If-None-Match");
+            }
+            if ( ifModifiedSince ) {
+                if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+                sb.append("If-Modified-Since");
+            }
+            if ( ifUnmodifiedSince ) {
+                if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+                sb.append("If-UnModified-Since");
+            }
+            if ( ifRange ) {
+                if ( sb.length() > PREDPREFIX.length() ) sb.append( ", ");
+                sb.append("If-Range");
+            }
+        } else {
+            sb.append("null");
+        }
+
+        return "eTag=" + eTag + ", lastModified=" + lastModified
+        + sb.toString();
+    }
 
     /**
      * Gets the cache context information (ETag, LastModified, predicates) from the Http request.
@@ -212,46 +212,46 @@
      * @return
      */
     public static HTTPCacheContext getCacheContextFromRequest( HttpServletRequest request ) throws java.text.ParseException {
-    	HTTPCacheContext context = new HTTPCacheContext();
-    	
-    	String eTag = request.getHeader( "If-Match" );    	
-    	if ( eTag != null ) {
-    	   context.setETag( eTag );
-    	   context.setIfMatch( true );
-    	}
-    	eTag = request.getHeader( "If-None-Match" );    	
-    	if ( eTag != null ) {
-    	   context.setETag( eTag );
-    	   context.setIfNoneMatch( true );
-    	}
+        HTTPCacheContext context = new HTTPCacheContext();
+
+        String eTag = request.getHeader( "If-Match" );    	
+        if ( eTag != null ) {
+            context.setETag( eTag );
+            context.setIfMatch( true );
+        }
+        eTag = request.getHeader( "If-None-Match" );    	
+        if ( eTag != null ) {
+            context.setETag( eTag );
+            context.setIfNoneMatch( true );
+        }
         String lastModifiedString = request.getHeader( "If-Modified-Since" );        
-    	if ( lastModifiedString != null ) {
-     	   context.setLastModified( lastModifiedString );
-    	   context.setIfModifiedSince( true );
-     	}
+        if ( lastModifiedString != null ) {
+            context.setLastModified( lastModifiedString );
+            context.setIfModifiedSince( true );
+        }
         lastModifiedString = request.getHeader( "If-Unmodified-Since" );        
-    	if ( lastModifiedString != null ) {
-     	   context.setLastModified( lastModifiedString );
-    	   context.setIfUnmodifiedSince( true );
-     	}
+        if ( lastModifiedString != null ) {
+            context.setLastModified( lastModifiedString );
+            context.setIfUnmodifiedSince( true );
+        }
         lastModifiedString = request.getHeader( "If-Range" );        
-    	if ( lastModifiedString != null ) {
-     	   context.setLastModified( lastModifiedString );
-    	   context.setIfRange( true );
-     	}
-    	return context;
-    }
-	/**
-	 * Enabled is true whenever ETag, LastModified, or predicate is set.
-	 * @return the enabled
-	 */
-	public boolean isEnabled() {
-		return enabled;
-	}
-	/**
-	 * @param enabled the enabled to set
-	 */
-	public void setEnabled(boolean enabled) {
-		this.enabled = enabled;
-	}
+        if ( lastModifiedString != null ) {
+            context.setLastModified( lastModifiedString );
+            context.setIfRange( true );
+        }
+        return context;
+    }
+    /**
+     * Enabled is true whenever ETag, LastModified, or predicate is set.
+     * @return the enabled
+     */
+    public boolean isEnabled() {
+        return enabled;
+    }
+    /**
+     * @param enabled the enabled to set
+     */
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
 }

Modified: tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java?rev=823026&r1=823025&r2=823026&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java (original)
+++ tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/impl/HTTPBindingImpl.java Thu Oct  8 05:35:29 2009
@@ -32,16 +32,16 @@
  * @version $Rev$ $Date$
  */
 class HTTPBindingImpl implements HTTPBinding {
-    
+
     private String name;
     private String uri;
-    
+
     private WireFormat wireFormat;
     private OperationSelector operationSelector;    
 
     public QName getType() {
-		return TYPE;
-	}
+        return TYPE;
+    }
 
     public String getName() {
         return name;
@@ -58,41 +58,41 @@
     public void setURI(String uri) {
         this.uri = uri;
     }
-    
-	public boolean isUnresolved() {
+
+    public boolean isUnresolved() {
         return false;
     }
 
     public void setUnresolved(boolean unresolved) {
         // The sample binding is always resolved
     }
-    
+
     // Wireformat and Operation selection
-    
+
     public WireFormat getRequestWireFormat() {
         return wireFormat;
     }
-    
+
     public void setRequestWireFormat(WireFormat wireFormat) {
         this.wireFormat = wireFormat;
     }
-    
+
     public WireFormat getResponseWireFormat() {
         return wireFormat;
     }
-    
+
     public void setResponseWireFormat(WireFormat wireFormat) {
         this.wireFormat = wireFormat;
     }    
-    
+
     public OperationSelector getOperationSelector() {
         return operationSelector;
     }
-    
+
     public void setOperationSelector(OperationSelector operationSelector) {
         this.operationSelector = operationSelector;
     }    
-    
+
     @Override
     public Object clone() throws CloneNotSupportedException {
         return super.clone();

Modified: tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java?rev=823026&r1=823025&r2=823026&view=diff
==============================================================================
--- tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java (original)
+++ tuscany/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java Thu Oct  8 05:35:29 2009
@@ -47,10 +47,10 @@
 public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<HTTPBinding> {
     private static final String BINDING_HTTP = "binding.http";
     private static final QName BINDING_HTTP_QNAME = HTTPBinding.TYPE;
-    
+
     private static final String NAME = "name";
     private static final String URI = "uri";
-    
+
     private HTTPBindingFactory httpBindingFactory;
     private StAXArtifactProcessor<Object> extensionProcessor;
     private StAXAttributeProcessor<Object> extensionAttributeProcessor;
@@ -66,52 +66,52 @@
         this.extensionAttributeProcessor = extensionAttributeProcessor;
         this.monitor = monitor;
     }
-    
+
     public QName getArtifactType() {
         return BINDING_HTTP_QNAME;
     }
-    
+
     public Class<HTTPBinding> getModelType() {
         return HTTPBinding.class;
     }
 
     public HTTPBinding read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
         HTTPBinding httpBinding = httpBindingFactory.createHTTPBinding();
-        
+
         while(reader.hasNext()) {
             QName elementName = null;
             int event = reader.getEventType();
             switch (event) {
                 case START_ELEMENT:
                     elementName = reader.getName();
-                     
-                     if (BINDING_HTTP_QNAME.equals(elementName)) {
-                         String name = getString(reader, NAME);
-                         if(name != null) {
-                             httpBinding.setName(name);
-                         }
-                         
-                         String uri = getString(reader, URI);
-                         if (uri != null) {
-                             httpBinding.setURI(uri);
-                         }
-                     } else {
-                         // Read an extension element
-                         Object extension = extensionProcessor.read(reader);
-                         if (extension != null) {
-                             if (extension instanceof WireFormat) {
-                                 httpBinding.setRequestWireFormat((WireFormat)extension);
-                             } else if(extension instanceof OperationSelector) {
-                                 httpBinding.setOperationSelector((OperationSelector)extension);
-                             }
-                         }
-                     }
+
+                    if (BINDING_HTTP_QNAME.equals(elementName)) {
+                        String name = getString(reader, NAME);
+                        if(name != null) {
+                            httpBinding.setName(name);
+                        }
+
+                        String uri = getString(reader, URI);
+                        if (uri != null) {
+                            httpBinding.setURI(uri);
+                        }
+                    } else {
+                        // Read an extension element
+                        Object extension = extensionProcessor.read(reader);
+                        if (extension != null) {
+                            if (extension instanceof WireFormat) {
+                                httpBinding.setRequestWireFormat((WireFormat)extension);
+                            } else if(extension instanceof OperationSelector) {
+                                httpBinding.setOperationSelector((OperationSelector)extension);
+                            }
+                        }
+                    }
             }
-            
+
             if (event == END_ELEMENT && BINDING_HTTP_QNAME.equals(reader.getName())) {
                 break;
             }
-            
+
             // Read the next element
             if (reader.hasNext()) {
                 reader.next();
@@ -123,9 +123,9 @@
 
     public void write(HTTPBinding httpBinding, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException {
         //writer.writeStartElement(Constants.SCA10_NS, BINDING_HTTP);
-        
+
         writeStart(writer, BINDING_HTTP_QNAME.getNamespaceURI(), BINDING_HTTP_QNAME.getLocalPart());
-        
+
         // Write binding name
         if (httpBinding.getName() != null) {
             writer.writeAttribute(NAME, httpBinding.getName());
@@ -135,7 +135,7 @@
         if (httpBinding.getURI() != null) {
             writer.writeAttribute(URI, httpBinding.getURI());
         }
-        
+
         writeEnd(writer);
         //writer.writeEndElement();
     }
@@ -143,7 +143,7 @@
 
     public void resolve(HTTPBinding model, ModelResolver resolver) throws ContributionResolveException {
         // Should not need to do anything here for now... 
-        
+
     }
 
     /**
@@ -154,12 +154,12 @@
      * @param model
      */
     private void warning(String message, Object model, Object... messageParameters) {
-       if (monitor != null) {
-           Problem problem = monitor.createProblem(this.getClass().getName(), "binding-http-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
-           monitor.problem(problem);
-       }
+        if (monitor != null) {
+            Problem problem = monitor.createProblem(this.getClass().getName(), "binding-http-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+            monitor.problem(problem);
+        }
     }
-         
+
     /**
      * Report a error.
      *