Il giorno lun, 10/07/2006 alle 09.55 -0600, Tom Tromey ha scritto: > >>>>> "Mario" == Mario Torre <[EMAIL PROTECTED]> writes: > > Mario> Before committing, I wait for approval, > > Looks pretty good... I just have a couple nits to point out.
Fixed them, is now ok?
> Tom
Mario
----
2006-07-10 Mario Torre <[EMAIL PROTECTED]>
* java/awt/BasicStroke.java: Removed unused import.
* gnu/java/awt/java2d/CubicSegment.java (clone): Fixed.
* gnu/java/awt/java2d/LineSegment.java (clone): Fixed.
* gnu/java/awt/java2d/QuadSegment.java (clone): Fixed.
--
Lima Software, SO.PR.IND. s.r.l.
http://www.limasoftware.net/
pgp key: http://subkeys.pgp.net/
Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/
Index: gnu/java/awt/java2d/CubicSegment.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/CubicSegment.java,v
retrieving revision 1.1
diff -u -r1.1 CubicSegment.java
--- gnu/java/awt/java2d/CubicSegment.java 24 Apr 2006 14:37:23 -0000 1.1
+++ gnu/java/awt/java2d/CubicSegment.java 10 Jul 2006 16:22:56 -0000
@@ -78,8 +78,25 @@
*/
public Object clone()
{
- return new CubicSegment(P1.getX(), P1.getY(), cp1.getX(), cp1.getY(),
- cp2.getX(), cp2.getY(), P2.getX(), P2.getY());
+ CubicSegment segment = null;
+
+ try
+ {
+ segment = (CubicSegment) super.clone();
+
+ segment.P1 = (Point2D) P1.clone();
+ segment.P2 = (Point2D) P2.clone();
+ segment.cp1 = (Point2D) cp1.clone();
+ segment.cp2 = (Point2D) cp2.clone();
+ }
+ catch (CloneNotSupportedException cnse)
+ {
+ InternalError ie = new InternalError();
+ ie.initCause(cnse.getCause());
+ throw ie;
+ }
+
+ return segment;
}
/**
@@ -100,7 +117,6 @@
double[] p1 = normal(x0, y0, x1, y1);
double[] p2 = normal(x2, y2, x3, y3);
-
// FIXME: Doesn't compile.
// return new Segment[]{s1, s2};
return new Segment[0];
Index: gnu/java/awt/java2d/LineSegment.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/LineSegment.java,v
retrieving revision 1.1
diff -u -r1.1 LineSegment.java
--- gnu/java/awt/java2d/LineSegment.java 24 Apr 2006 14:37:23 -0000 1.1
+++ gnu/java/awt/java2d/LineSegment.java 10 Jul 2006 16:22:56 -0000
@@ -62,7 +62,22 @@
*/
public Object clone()
{
- return new LineSegment(P1, P2);
+ LineSegment segment = null;
+
+ try
+ {
+ segment = (LineSegment) super.clone();
+ segment.P1 = (Point2D) P1.clone();
+ segment.P2 = (Point2D) P2.clone();
+ }
+ catch (CloneNotSupportedException cnse)
+ {
+ InternalError ie = new InternalError();
+ ie.initCause(cnse.getCause());
+ throw ie;
+ }
+
+ return segment;
}
/**
Index: gnu/java/awt/java2d/QuadSegment.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/QuadSegment.java,v
retrieving revision 1.1
diff -u -r1.1 QuadSegment.java
--- gnu/java/awt/java2d/QuadSegment.java 24 Apr 2006 14:37:23 -0000 1.1
+++ gnu/java/awt/java2d/QuadSegment.java 10 Jul 2006 16:22:56 -0000
@@ -88,8 +88,24 @@
*/
public Object clone()
{
- return new QuadSegment(P1.getX(), P1.getY(), cp.getX(), cp.getY(),
- P2.getX(), P2.getY());
+ QuadSegment segment = null;
+
+ try
+ {
+ segment = (QuadSegment) super.clone();
+
+ segment.P1 = (Point2D) P1.clone();
+ segment.P2 = (Point2D) P2.clone();
+ segment.cp = (Point2D) cp.clone();
+ }
+ catch (CloneNotSupportedException cnse)
+ {
+ InternalError ie = new InternalError();
+ ie.initCause(cnse.getCause());
+ throw ie;
+ }
+
+ return segment;
}
/**
Index: java/awt/BasicStroke.java
===================================================================
RCS file: /sources/classpath/classpath/java/awt/BasicStroke.java,v
retrieving revision 1.13
diff -u -r1.13 BasicStroke.java
--- java/awt/BasicStroke.java 15 Jun 2006 18:09:25 -0000 1.13
+++ java/awt/BasicStroke.java 10 Jul 2006 16:23:01 -0000
@@ -43,7 +43,6 @@
import gnu.java.awt.java2d.QuadSegment;
import gnu.java.awt.java2d.Segment;
-import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
signature.asc
Description: Questa รจ una parte del messaggio firmata digitalmente
