camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r731846 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
Date Tue, 06 Jan 2009 06:41:06 GMT
Author: davsclaus
Date: Mon Jan  5 22:41:06 2009
New Revision: 731846

URL: http://svn.apache.org/viewvc?rev=731846&view=rev
Log:
Polished code so its immutable (no setters)

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java?rev=731846&r1=731845&r2=731846&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/StringSource.java
Mon Jan  5 22:41:06 2009
@@ -54,9 +54,9 @@
     }
 
     public StringSource(String text, String systemId, String encoding) {
-        this.text = text;
+        this(text, systemId);
+        ObjectHelper.notNull(encoding, "encoding");
         this.encoding = encoding;
-        setSystemId(systemId);
     }
 
     public InputStream getInputStream() {
@@ -83,14 +83,6 @@
         return encoding;
     }
 
-    public void setEncoding(String encoding) {
-        this.encoding = encoding;
-    }
-
-    public void setText(String text) {
-        this.text = text;
-    }
-
     public void writeExternal(ObjectOutput out) throws IOException {
         out.writeUTF(text);
         out.writeUTF(encoding);



Mime
View raw message