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() {
}