Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5089/src/net/sourceforge/bprocessor/model
Modified Files:
Surface.java Space.java
Log Message:
Trying to make sure surfaces with NULL as a front or back domain does not occur
Index: Surface.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** Surface.java 24 Aug 2006 11:51:10 -0000 1.105
--- Surface.java 29 Aug 2006 09:32:26 -0000 1.106
***************
*** 1009,1012 ****
--- 1009,1015 ----
*/
public Space getBackDomain() {
+ if (backDomain == null && getOwner() != null) {
+ setBackDomain(getOwner().getEmpty());
+ }
return backDomain;
}
***************
*** 1039,1042 ****
--- 1042,1048 ----
*/
public Space getFrontDomain() {
+ if (frontDomain == null && getOwner() != null) {
+ setFrontDomain(getOwner().getEmpty());
+ }
return frontDomain;
}
Index: Space.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** Space.java 23 Aug 2006 13:43:19 -0000 1.49
--- Space.java 29 Aug 2006 09:32:26 -0000 1.50
***************
*** 634,637 ****
--- 634,643 ----
surfaces.put(id, surface);
surface.setOwner(this);
+ if (surface.getFrontDomain() == null) {
+ surface.setFrontDomain(empty);
+ }
+ if (surface.getBackDomain() == null) {
+ surface.setBackDomain(empty);
+ }
} else {
throw new Error("adding surface to non-container " + this);
|