Return-Path: Delivered-To: apmail-incubator-chemistry-commits-archive@minotaur.apache.org Received: (qmail 54115 invoked from network); 9 May 2009 09:42:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 May 2009 09:42:10 -0000 Received: (qmail 88091 invoked by uid 500); 9 May 2009 09:42:10 -0000 Delivered-To: apmail-incubator-chemistry-commits-archive@incubator.apache.org Received: (qmail 88059 invoked by uid 500); 9 May 2009 09:42:10 -0000 Mailing-List: contact chemistry-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-commits@incubator.apache.org Delivered-To: moderator for chemistry-commits@incubator.apache.org Received: (qmail 63549 invoked by uid 99); 9 May 2009 08:40:53 -0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r773181 - in /incubator/chemistry/trunk/chemistry: README.txt chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java Date: Sat, 09 May 2009 08:40:28 -0000 To: chemistry-commits@incubator.apache.org From: sfermigier@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090509084028.D21B02388830@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sfermigier Date: Sat May 9 08:40:28 2009 New Revision: 773181 URL: http://svn.apache.org/viewvc?rev=773181&view=rev Log: Fix error introduced by previous cleanup. Wasn't catched by mvn test. WTF? Modified: incubator/chemistry/trunk/chemistry/README.txt incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java Modified: incubator/chemistry/trunk/chemistry/README.txt URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/README.txt?rev=773181&r1=773180&r2=773181&view=diff ============================================================================== --- incubator/chemistry/trunk/chemistry/README.txt (original) +++ incubator/chemistry/trunk/chemistry/README.txt Sat May 9 08:40:28 2009 @@ -1,7 +1,8 @@ Apache Chemistry - +================ Building +-------- Using maven, build with: @@ -13,6 +14,7 @@ Testing +------- A small in-memory demo AtomPub server can then be launched with: Modified: incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java?rev=773181&r1=773180&r2=773181&view=diff ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java (original) +++ incubator/chemistry/trunk/chemistry/chemistry-commons/src/main/java/org/apache/chemistry/impl/simple/SimpleDocument.java Sat May 9 08:40:28 2009 @@ -86,23 +86,17 @@ String mimeType = getString(Property.CONTENT_STREAM_MIME_TYPE); String filename = getString(Property.CONTENT_STREAM_FILENAME); URI uri = getURI(Property.CONTENT_STREAM_URI); - try { - return new SimpleContentStream(contentBytes, mimeType, filename, - uri); - } catch (IOException e) { - // cannot happen, reading from ByteArrayInputStream - return null; - } + return new SimpleContentStream(contentBytes, mimeType, filename, uri); } public void setContentStream(ContentStream contentStream) throws IOException { ContentStreamPresence csa = getType().getContentStreamAllowed(); if (csa == ContentStreamPresence.NOT_ALLOWED && contentStream != null) { - throw new RuntimeException("Content stream not allowed"); // TODO + throw new IllegalStateException("Content stream not allowed"); // TODO } else if (csa == ContentStreamPresence.REQUIRED && contentStream == null) { - throw new RuntimeException("Content stream required"); // TODO + throw new IllegalStateException("Content stream required"); // TODO } if (contentStream == null) { entry.setValue(Property.CONTENT_STREAM_LENGTH, null); Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java?rev=773181&r1=773180&r2=773181&view=diff ============================================================================== --- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java (original) +++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/RepositoryCreationHelper.java Sat May 9 08:40:28 2009 @@ -40,6 +40,7 @@ */ public class RepositoryCreationHelper { + // Utility class private RepositoryCreationHelper() { }