You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by cs...@apache.org on 2012/03/20 16:53:03 UTC

svn commit: r1302953 - /commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java

Author: cs
Date: Tue Mar 20 15:53:03 2012
New Revision: 1302953

URL: http://svn.apache.org/viewvc?rev=1302953&view=rev
Log:
corrected output format: property names are not quoted, while property values are -- actually only strings should be quoted, so this needs further refinement based on property type

Modified:
    commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java

Modified: commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java?rev=1302953&r1=1302952&r2=1302953&view=diff
==============================================================================
--- commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java (original)
+++ commons/sandbox/graph/branches/exporters-with-mappers/src/main/java/org/apache/commons/graph/export/DotExporter.java Tue Mar 20 15:53:03 2012
@@ -168,8 +168,8 @@ final class DotExporter<V, E>
 
             for ( Entry<String, Object> property : properties.entrySet() )
             {
-            	String formattedString = countAddedProperties == properties.size() - 1 ? "\"%s\"=%s" : 
-            		                                                                     "\"%s\"=%s ";
+            	String formattedString = countAddedProperties == properties.size() - 1 ? "%s=\"%s\"" : 
+            		                                                                     "%s=\"%s\" ";
                 printWriter.format( formattedString, property.getKey(), property.getValue() );
                 countAddedProperties++;
             }