Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21540/src/net/sourceforge/bprocessor/model
Modified Files:
Surface.java Space.java
Log Message:
Uses Collections.EMPTY_LIST to represent empty collections.
Index: Surface.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v
retrieving revision 1.130
retrieving revision 1.131
diff -C2 -d -r1.130 -r1.131
*** Surface.java 23 Jan 2007 14:31:26 -0000 1.130
--- Surface.java 24 Jan 2007 12:08:32 -0000 1.131
***************
*** 9,12 ****
--- 9,13 ----
import java.util.ArrayList;
import java.util.Collection;
+ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
***************
*** 489,493 ****
public Collection getHoles() {
if (holes == null) {
! return Space.EMPTY;
} else {
return holes;
--- 490,494 ----
public Collection getHoles() {
if (holes == null) {
! return Collections.EMPTY_LIST;
} else {
return holes;
Index: Space.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** Space.java 24 Jan 2007 10:23:11 -0000 1.112
--- Space.java 24 Jan 2007 12:08:32 -0000 1.113
***************
*** 32,41 ****
*/
public class Space extends Geometric implements Parametric {
! /** Default */
! private static final long serialVersionUID = 1L;
!
! /** An empty collection */
! protected static final Collection EMPTY = new LinkedList();
!
/** Construction Type */
public static final int CONSTRUCTION = 0;
--- 32,36 ----
*/
public class Space extends Geometric implements Parametric {
! private static Logger log = Logger.getLogger(Space.class);
/** Construction Type */
public static final int CONSTRUCTION = 0;
***************
*** 62,67 ****
private boolean isUnion = false;
! /** The logger */
! private static Logger log = Logger.getLogger(Space.class);
/** The name */
private String name;
--- 57,61 ----
private boolean isUnion = false;
!
/** The name */
private String name;
***************
*** 523,527 ****
return constructors.values();
} else {
! return EMPTY;
}
}
--- 517,521 ----
return constructors.values();
} else {
! return Collections.EMPTY_LIST;
}
}
***************
*** 646,650 ****
return proto.getVertices();
} else {
! return EMPTY;
}
}
--- 640,644 ----
return proto.getVertices();
} else {
! return Collections.EMPTY_LIST;
}
}
***************
*** 868,872 ****
return proto.getEdges();
} else {
! return EMPTY;
}
}
--- 862,866 ----
return proto.getEdges();
} else {
! return Collections.EMPTY_LIST;
}
}
***************
*** 1054,1058 ****
return proto.getSurfaces();
} else {
! return EMPTY;
}
}
--- 1048,1052 ----
return proto.getSurfaces();
} else {
! return Collections.EMPTY_LIST;
}
}
***************
*** 1117,1121 ****
return materials.values();
} else {
! return EMPTY;
}
}
--- 1111,1115 ----
return materials.values();
} else {
! return Collections.EMPTY_LIST;
}
}
***************
*** 1423,1427 ****
return proto.getElements();
} else {
! return EMPTY;
}
}
--- 1417,1421 ----
return proto.getElements();
} else {
! return Collections.EMPTY_LIST;
}
}
|