1 |
fordfrog 11/12/25 21:15:11 |
2 |
|
3 |
Added: DOTExporter-nullpointer.patch |
4 |
Log: |
5 |
dev-java/jgrapht: version bump |
6 |
|
7 |
(Portage version: 2.1.10.43/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-java/jgrapht/files/DOTExporter-nullpointer.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jgrapht/files/DOTExporter-nullpointer.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jgrapht/files/DOTExporter-nullpointer.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: DOTExporter-nullpointer.patch |
16 |
=================================================================== |
17 |
--- src/org/jgrapht/ext/DOTExporter.java 2010-11-27 23:36:27.000000000 -0600 |
18 |
+++ DOTExporter.java 2011-12-07 21:06:03.041369519 -0600 |
19 |
@@ -152,7 +152,7 @@ |
20 |
if (vertexLabelProvider != null) { |
21 |
labelName = vertexLabelProvider.getVertexName(v); |
22 |
} |
23 |
- Map<String, String> attributes = null; |
24 |
+ Map<String, String> attributes = new HashMap<String, String>();; |
25 |
if (vertexAttributeProvider != null) { |
26 |
attributes = vertexAttributeProvider.getComponentAttributes(v); |
27 |
} |
28 |
@@ -200,14 +200,16 @@ |
29 |
if (labelName != null) { |
30 |
out.print("label=\"" + labelName + "\" "); |
31 |
} |
32 |
- for (Map.Entry<String, String> entry : attributes.entrySet()) { |
33 |
- String name = entry.getKey(); |
34 |
- if (name.equals("label")) { |
35 |
- // already handled by special case above |
36 |
- continue; |
37 |
- } |
38 |
- out.print(name + "=\"" + entry.getValue() + "\" "); |
39 |
- } |
40 |
+ if (attributes != null) { |
41 |
+ for (Map.Entry<String, String> entry : attributes.entrySet()) { |
42 |
+ String name = entry.getKey(); |
43 |
+ if (name.equals("label")) { |
44 |
+ // already handled by special case above |
45 |
+ continue; |
46 |
+ } |
47 |
+ out.print(name + "=\"" + entry.getValue() + "\" "); |
48 |
+ } |
49 |
+ } |
50 |
out.print("]"); |
51 |
} |