camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1177947 - in /camel/branches/camel-2.7.x: ./ camel-core/src/main/java/org/apache/camel/component/file/ camel-core/src/test/java/org/apache/camel/component/file/ components/camel-printer/src/main/java/org/apache/camel/component/printer/
Date Sat, 01 Oct 2011 08:39:40 GMT
Author: davsclaus
Date: Sat Oct  1 08:39:40 2011
New Revision: 1177947

URL: http://svn.apache.org/viewvc?rev=1177947&view=rev
Log:
Merged revisions 1177946 via svnmerge from 
https://svn.apache.org/repos/asf/camel/branches/camel-2.8.x


Modified:
    camel/branches/camel-2.7.x/   (props changed)
    camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java
  (props changed)
    camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
  (props changed)
    camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
    camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java

Propchange: camel/branches/camel-2.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct  1 08:39:40 2011
@@ -1,2 +1,2 @@
-/camel/branches/camel-2.8.x:1174571,1175323,1176329,1176787,1177397
-/camel/trunk:1146608,1146903,1147216,1174565,1175321,1176274,1176781-1176782,1177394
+/camel/branches/camel-2.8.x:1174571,1175323,1176329,1176787,1177397,1177946
+/camel/trunk:1146608,1146903,1147216,1174565,1175321,1176274,1176781-1176782,1177394,1177945

Propchange: camel/branches/camel-2.7.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Oct  1 08:39:40 2011
@@ -1 +1 @@
-/camel/branches/camel-2.8.x:1-1146127,1146608,1146653,1146771,1146903,1147216,1174571,1175323,1176329,1176787,1177397
+/camel/branches/camel-2.8.x:1-1146127,1146608,1146653,1146771,1146903,1147216,1174571,1175323,1176329,1176787,1177397,1177946

Propchange: camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct  1 08:39:40 2011
@@ -1,2 +1,2 @@
-/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java:1174571,1175323,1176787,1177397
+/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java:1174571,1175323,1176787,1177397,1177946
 /camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConverter.java:1124595

Propchange: camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct  1 08:39:40 2011
@@ -1,2 +1,2 @@
-/camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java:1174571,1175323,1176787,1177397
+/camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java:1174571,1175323,1176787,1177397,1177946
 /camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java:1124595

Modified: camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java?rev=1177947&r1=1177946&r2=1177947&view=diff
==============================================================================
--- camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
(original)
+++ camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
Sat Oct  1 08:39:40 2011
@@ -23,9 +23,8 @@ import javax.print.DocFlavor;
 import javax.print.attribute.standard.MediaSizeName;
 import javax.print.attribute.standard.Sides;
 
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class PrinterConfiguration {
     private static final transient Logger LOG = LoggerFactory.getLogger(PrinterConfiguration.class);
@@ -60,7 +59,12 @@ public class PrinterConfiguration {
         setUri(uri);
         setHostname(uri.getHost());
         setPort(uri.getPort());
-        setPrintername(uri.getPath());
+
+        // use path as printer name, but without any leading slashes
+        String path = uri.getPath();
+        path = ObjectHelper.removeStartingCharacters(path, '/');
+        path = ObjectHelper.removeStartingCharacters(path, '\\');
+        setPrintername(path);
         
         Map printSettings = URISupport.parseParameters(uri);
         setFlavor((String)printSettings.get("flavor"));

Modified: camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java?rev=1177947&r1=1177946&r2=1177947&view=diff
==============================================================================
--- camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
(original)
+++ camel/branches/camel-2.7.x/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
Sat Oct  1 08:39:40 2011
@@ -84,7 +84,7 @@ public class PrinterProducer extends Def
         PrintService printService;
         
         if ((config.getHostname().equalsIgnoreCase("localhost")) 
-            && (config.getPrintername().equalsIgnoreCase("/default"))) {
+            && (config.getPrintername().equalsIgnoreCase("default"))) {
             printService = PrintServiceLookup.lookupDefaultPrintService();            
         } else {
             PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);



Mime
View raw message