Revision: 12901
http://sourceforge.net/p/foray/code/12901
Author: victormote
Date: 2022-12-20 23:39:15 +0000 (Tue, 20 Dec 2022)
Log Message:
-----------
Simplification for returning empty list.
Modified Paths:
--------------
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/FoObj.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -143,7 +143,6 @@
import java.awt.Color;
import java.awt.Shape;
import java.net.URL;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
@@ -154,9 +153,6 @@
public abstract class FoObj extends AbstractOrderedTreeNode<FoObj>
implements Fo, FoAllProperties, AbstractOrderedTreeNode.Convertible<FoObj> {
- /** A static empty and immutable list of children, suitable for return by objects that have no children. */
- protected static final List<FoObj> EMPTY_CHILD_LIST = Collections.emptyList();
-
/** Static CharSequence containing one space, to be used for obtaining a font
* for the page-citation-* objects. */
protected static final String PAGE_CITATION_TEXT_SEGMENT = " ";
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/ForeignXml.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -39,6 +39,7 @@
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
+import java.util.Collections;
import java.util.List;
/**
@@ -245,7 +246,7 @@
@Override
public List<FoObj> getChildren() {
- return FoObj.EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/AbstractPageReference.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -34,6 +34,7 @@
import org.axsl.fotree.FoTreeException;
+import java.util.Collections;
import java.util.List;
/**
@@ -82,7 +83,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarBegin4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.ChangeBarBegin;
+import java.util.Collections;
import java.util.List;
/**
@@ -108,7 +109,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ChangeBarEnd4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.ChangeBarEnd;
+import java.util.Collections;
import java.util.List;
/**
@@ -108,7 +109,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/Character4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -39,6 +39,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.Character;
+import java.util.Collections;
import java.util.List;
/**
@@ -126,7 +127,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ColorProfile4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.ColorProfile;
+import java.util.Collections;
import java.util.List;
/**
@@ -107,7 +108,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/ExternalGraphic4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -37,6 +37,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.ExternalGraphic;
+import java.util.Collections;
import java.util.List;
/**
@@ -104,7 +105,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FlowNameSpecifier4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.FlowNameSpecifier;
+import java.util.Collections;
import java.util.List;
/**
@@ -108,7 +109,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/FoText4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -41,6 +41,7 @@
import org.axsl.value.TextTransform;
import org.axsl.value.WhiteSpaceTreatment;
+import java.util.Collections;
import java.util.List;
/**
@@ -58,7 +59,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/MultiPropertySet4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -36,6 +36,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.MultiPropertySet;
+import java.util.Collections;
import java.util.List;
/**
@@ -107,7 +108,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/RetrieveMarker4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -39,6 +39,7 @@
import org.axsl.value.RetrieveBoundary;
import org.axsl.value.RetrievePosition;
+import java.util.Collections;
import java.util.List;
/**
@@ -171,7 +172,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
Modified: trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java
===================================================================
--- trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java 2022-12-20 01:36:41 UTC (rev 12900)
+++ trunk/foray/foray-fotree/src/main/java/org/foray/fotree/fo/obj/TableColumn4a.java 2022-12-20 23:39:15 UTC (rev 12901)
@@ -37,6 +37,7 @@
import org.axsl.fotree.FoVisitor;
import org.axsl.fotree.fo.TableColumn;
+import java.util.Collections;
import java.util.List;
/**
@@ -165,7 +166,7 @@
@Override
public List<FoObj> getChildren() {
- return EMPTY_CHILD_LIST;
+ return Collections.emptyList();
}
@Override
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|