From fd8f70bb0751bf07bcf0c4d92c047ec41e067fa2 Mon Sep 17 00:00:00 2001 From: Peter Herweg Date: Mon, 9 Jan 2006 22:35:33 +0000 Subject: [PATCH] fix error with lists: listIdGenerator must not be a local variable, in order to return different random numbers git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@367420 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java index 01e063aa9..81993b973 100644 --- a/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java +++ b/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java @@ -44,14 +44,13 @@ public class RtfList extends RtfContainer { private RtfListStyle defaultListStyle; private Integer listTemplateId = null; private Integer listId = null; + static private Random listIdGenerator = new Random(0); /** Create an RTF list as a child of given container with given attributes */ RtfList(RtfContainer parent, Writer w, RtfAttributes attr) throws IOException { super((RtfContainer)parent, w, attr); //random number generator for ids - Date runTime = new Date(); - Random listIdGenerator = new Random(0); listId = new Integer(listIdGenerator.nextInt()); listTemplateId = new Integer(listIdGenerator.nextInt()); -- 2.39.5