This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new 75d3367 Improved: replaces java.rmi.server.UID by java.util.UUID
75d3367 is described below
commit 75d3367d47abae604126a97a80e715a798e7fc55
Author: Jacques Le Roux <
[hidden email]>
AuthorDate: Tue Mar 23 09:38:03 2021 +0100
Improved: replaces java.rmi.server.UID by java.util.UUID
Not a big deal but better use java.util.UUID there.
---
.../ofbiz/widget/renderer/macro/FtlWriter.java | 23 +++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/FtlWriter.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/FtlWriter.java
index 730cf2b..744a9c5 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/FtlWriter.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/FtlWriter.java
@@ -18,23 +18,24 @@
*******************************************************************************/
package org.apache.ofbiz.widget.renderer.macro;
-import freemarker.core.Environment;
-import freemarker.template.Template;
-import freemarker.template.TemplateException;
-import org.apache.ofbiz.base.util.Debug;
-import org.apache.ofbiz.base.util.UtilMisc;
-import org.apache.ofbiz.base.util.template.FreeMarkerWorker;
-import org.apache.ofbiz.widget.renderer.VisualTheme;
-import org.apache.ofbiz.widget.renderer.macro.renderable.RenderableFtl;
-
import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
-import java.rmi.server.UID;
import java.util.Locale;
import java.util.Map;
+import java.util.UUID;
import java.util.WeakHashMap;
+import org.apache.ofbiz.base.util.Debug;
+import org.apache.ofbiz.base.util.UtilMisc;
+import org.apache.ofbiz.base.util.template.FreeMarkerWorker;
+import org.apache.ofbiz.widget.renderer.VisualTheme;
+import org.apache.ofbiz.widget.renderer.macro.renderable.RenderableFtl;
+
+import freemarker.core.Environment;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
/**
* Processes FTL templates and writes result to Appendables.
*/
@@ -73,7 +74,7 @@ public final class FtlWriter {
environment.setVariable("modelTheme",
FreeMarkerWorker.autoWrap(visualTheme.getModelTheme(), environment));
Reader templateReader = new StringReader(ftlString);
- Template template = new Template(new UID().toString(), templateReader,
+ Template template = new Template(UUID.randomUUID().toString(), templateReader,
FreeMarkerWorker.getDefaultOfbizConfig());
templateReader.close();
environment.include(template);