[FOray-commit] SF.net SVN: foray:[10639] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2009-03-10 23:36:12
|
Revision: 10639
http://foray.svn.sourceforge.net/foray/?rev=10639&view=rev
Author: victormote
Date: 2009-03-10 23:35:57 +0000 (Tue, 10 Mar 2009)
Log Message:
-----------
Make the clone() method return a more specific type.
Modified Paths:
--------------
trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java
trunk/foray/foray-ps/src/java/org/foray/ps/PsGraphicsState.java
trunk/foray/foray-ps/src/java/org/foray/ps/PsSystemDict.java
trunk/foray/scripts/checkstyle-config.xml
Modified: trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java
===================================================================
--- trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java 2009-03-10 23:22:28 UTC (rev 10638)
+++ trunk/foray/foray-hyphen/src/java/org/foray/hyphen/TernaryTree.java 2009-03-10 23:35:57 UTC (rev 10639)
@@ -394,7 +394,7 @@
/**
* {@inheritDoc}
*/
- public Object clone() {
+ public TernaryTree clone() {
final TernaryTree t = new TernaryTree();
t.lo = this.lo.clone();
t.hi = this.hi.clone();
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PsGraphicsState.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PsGraphicsState.java 2009-03-10 23:22:28 UTC (rev 10638)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PsGraphicsState.java 2009-03-10 23:35:57 UTC (rev 10639)
@@ -144,7 +144,7 @@
/**
* {@inheritDoc}
*/
- public Object clone() {
+ public PsGraphicsState clone() {
PsGraphicsState clone;
try {
clone = (PsGraphicsState) super.clone();
@@ -155,14 +155,6 @@
}
/**
- * Makes a clone of this.
- * @return The newly created clone.
- */
- public PsGraphicsState makeClone() {
- return (PsGraphicsState) this.clone();
- }
-
- /**
* Sets the color space.
* @param colorSpace The new colorspace.
*/
Modified: trunk/foray/foray-ps/src/java/org/foray/ps/PsSystemDict.java
===================================================================
--- trunk/foray/foray-ps/src/java/org/foray/ps/PsSystemDict.java 2009-03-10 23:22:28 UTC (rev 10638)
+++ trunk/foray/foray-ps/src/java/org/foray/ps/PsSystemDict.java 2009-03-10 23:35:57 UTC (rev 10639)
@@ -2118,7 +2118,7 @@
private void gsave() throws PsOperatorException {
final PsGraphicsStateStack graphicsStateStack = getInterpreter().getGraphicsStateStack();
final PsGraphicsState graphicsState = currentGS();
- final PsGraphicsState graphicsStateClone = graphicsState.makeClone();
+ final PsGraphicsState graphicsStateClone = graphicsState.clone();
graphicsStateStack.push(graphicsStateClone);
}
Modified: trunk/foray/scripts/checkstyle-config.xml
===================================================================
--- trunk/foray/scripts/checkstyle-config.xml 2009-03-10 23:22:28 UTC (rev 10638)
+++ trunk/foray/scripts/checkstyle-config.xml 2009-03-10 23:35:57 UTC (rev 10639)
@@ -215,35 +215,46 @@
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
</module>
+
<module name="GenericIllegalRegexp">
<property name="ignoreComments" value="true"/>
<!-- . matches any character, so we need to escape it and use \. to match dots. -->
<property name="format" value="System\.exit"/>
<property name="message" value="Never exit the jvm, except in void main(String[])."/>
</module>
+
<module name="GenericIllegalRegexp">
<property name="ignoreComments" value="true"/>
<property name="format" value="printStackTrace"/>
<property name="message" value="Do not dump a stacktrace, except in void main(String[])."/>
</module>
+
<module name="GenericIllegalRegexp">
<property name="ignoreComments" value="true"/>
<property name="format" value=" System.out.print"/>
<property name="message" value="Use logging instead of System.out, except in void
main(String[])."/>
</module>
+
<module name="GenericIllegalRegexp">
<property name="ignoreComments" value="true"/>
<property name="format" value=" System.err.print"/>
<property name="message" value="Use logging instead of System.err, except in void
main(String[])."/>
</module>
+
<module name="GenericIllegalRegexp">
<property name="ignoreComments" value="true"/>
<property name="format" value="(FOP|fop|Fop)"/>
<property name="message" value="Avoid legacy references to FOP."/>
</module>
+ <module name="GenericIllegalRegexp">
+ <property name="ignoreComments" value="false"/>
+ <property name="format" value="Object clone()"/>
+ <property name="message" value="Return a more specific type when cloning."/>
+ </module>
+
</module>
<!-- Make sure each package has javadoc package.html -->
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|