Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotate with @Deprecated if javadoc @deprecated used #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public void setIDESize(byte size) {
* @param colorModel the IDE color model.
* @deprecated Use {@link IDEStructureParameter#setColorModel(byte)} instead.
*/
@Deprecated
public void setIDEColorModel(byte colorModel) {
getImageContent().setImageIDEColorModel(colorModel);
}
Expand All @@ -123,6 +124,7 @@ public void setIDEColorModel(byte colorModel) {
* @param subtractive true for subtractive mode, false for additive mode
* @deprecated Use {@link IDEStructureParameter#setSubtractive(boolean)} instead.
*/
@Deprecated
public void setSubtractive(boolean subtractive) {
getImageContent().setSubtractive(subtractive);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public void setIDESize(byte size) {
* @deprecated Use {@link org.apache.fop.afp.ioca.IDEStructureParameter#setColorModel(byte)}
* instead.
*/
@Deprecated
public void setIDEColorModel(byte colorModel) {
getImageSegment().setIDEColorModel(colorModel);
}
Expand All @@ -151,6 +152,7 @@ public void setIDEColorModel(byte colorModel) {
* @deprecated Use {@link org.apache.fop.afp.ioca.IDEStructureParameter#setSubtractive(boolean)}
* instead.
*/
@Deprecated
public void setSubtractive(boolean subtractive) {
getImageSegment().setSubtractive(subtractive);
}
Expand Down
1 change: 1 addition & 0 deletions fop-core/src/main/java/org/apache/fop/apps/Fop.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public class Fop {
* an instance of this object, it means they also have the {@link FOUserAgent} since this's
* constructor is only used in {@link FOUserAgent}
*/
@Deprecated
public FOUserAgent getUserAgent() {
return foUserAgent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public FopFactoryBuilder(EnvironmentProfile enviro) {
* @return build the {@link FopFactoryConfig}
* @deprecated Exposing the {@link FopFactoryConfig} is only to maintain backwards compatibility
*/
@Deprecated
public FopFactoryConfig buildConfig() {
return buildConfiguration();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public class DefaultConfiguration implements Configuration {
/**
* @deprecated For debug only.
*/
@Deprecated
public static String toString(Document document) {
try {
Transformer transformer = TransformerFactory.newInstance().newTransformer();
Expand Down
1 change: 1 addition & 0 deletions fop-core/src/main/java/org/apache/fop/fo/FONode.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ protected static void validateChildNode(
* @deprecated Please override {@link #characters(char[], int, int, PropertyList, Locator)}
* instead!
*/
@Deprecated
protected void addCharacters(char[] data, int start, int end,
PropertyList pList,
Locator locator) throws FOPException {
Expand Down
2 changes: 2 additions & 0 deletions fop-core/src/main/java/org/apache/fop/fonts/FontCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public static File getDefaultCacheFile(boolean forWriting) {
* file exists or if it could not be read)
* @deprecated use {@link #loadFrom(File)} instead
*/
@Deprecated
public static FontCache load() {
return loadFrom(getDefaultCacheFile(false));
}
Expand Down Expand Up @@ -193,6 +194,7 @@ public static FontCache loadFrom(File cacheFile) {
* @throws FOPException fop exception
* @deprecated use {@link #saveTo(File)} instead
*/
@Deprecated
public void save() throws FOPException {
saveTo(getDefaultCacheFile(true));
}
Expand Down
1 change: 1 addition & 0 deletions fop-core/src/main/java/org/apache/fop/fonts/Glyphs.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* This class provides a number of constants for glyph management.
* @deprecated Use the Glyphs class from XML Graphics Commons instead!
*/
@Deprecated
public final class Glyphs {

private Glyphs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ private static void addBorderTrait(Area area,
* @param context Property evaluation context
* @deprecated Call the other addBorders() method and addPadding separately.
*/
@Deprecated
public static void addBorders(Area area, CommonBorderPaddingBackground borderProps,
PercentBaseContext context) {
BorderProps bps = getBorderProps(borderProps, CommonBorderPaddingBackground.BEFORE, context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ protected void setRenderingHintsForBufferedImage(Graphics2D g2d) {
* {@inheritDoc}
* @deprecated
*/
@Deprecated
public void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ private String convertToString(List children) {
* {@inheritDoc}
* @deprecated
*/
@Deprecated
public void startPageSequence(LineArea seqTitle) {
//do nothing
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ void paintImage(org.apache.xmlgraphics.java2d.Graphics2DImagePainter painter,
* @throws IOException In case of an I/O error while writing the output format
* @deprecated Use the variant with the Graphics2DImagePainter from XML Graphics Commons instead
*/
@Deprecated
void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* @deprecated use {@link org.apache.xmlgraphics.java2d.Graphics2DImagePainter} directly!
*/
// @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_INTERFACE")
@Deprecated
public interface Graphics2DImagePainter
extends org.apache.xmlgraphics.java2d.Graphics2DImagePainter {

Expand Down
1 change: 1 addition & 0 deletions fop-core/src/main/java/org/apache/fop/render/Renderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void stopRenderer()
* @param seqTitle The title of the page sequence
* @deprecated Use {@link #startPageSequence(PageSequence)} instead
*/
@Deprecated
void startPageSequence(LineArea seqTitle);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Helper methods for handling color profiles.
* @deprecated use org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil directly
*/
@Deprecated
public final class ColorProfileUtil {

private ColorProfileUtil() {
Expand All @@ -36,6 +37,7 @@ private ColorProfileUtil() {
* @return the description
* @deprecated use org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil directly
*/
@Deprecated
public static String getICCProfileDescription(ICC_Profile profile) {
return org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil
.getICCProfileDescription(profile);
Expand All @@ -48,6 +50,7 @@ public static String getICCProfileDescription(ICC_Profile profile) {
* @return true if it is the default sRGB profile
* @deprecated use org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil directly
*/
@Deprecated
public static boolean isDefaultsRGB(ICC_Profile profile) {
return org.apache.xmlgraphics.java2d.color.profile.ColorProfileUtil
.isDefaultsRGB(profile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @deprecated
* @see org.apache.xmlgraphics.util.uri.DataURIResolver
*/
@Deprecated
public class DataURIResolver implements URIResolver {

private final URIResolver newResolver = new org.apache.xmlgraphics.util.uri.DataURIResolver();
Expand All @@ -40,6 +41,7 @@ public class DataURIResolver implements URIResolver {
* @see org.apache.xmlgraphics.util.uri.DataURIResolver#resolve(String,
* String)
*/
@Deprecated
public Source resolve(String href, String base) throws TransformerException {
return newResolver.resolve(href, base);
}
Expand Down
9 changes: 5 additions & 4 deletions fop-core/src/main/java/org/apache/fop/util/DataURLUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @deprecated use org.apache.xmlgraphics.util.uri.DataURLUtil directly
* @see org.apache.xmlgraphics.util.uri.DataURLUtil
*/
@Deprecated
public final class DataURLUtil {

private DataURLUtil() {
Expand All @@ -38,9 +39,9 @@ private DataURLUtil() {
* @return a data url as a string
* @throws IOException if not caught
* @deprecated
* @see org.apache.xmlgraphics.util.uri.DataURLUtil#createDataURL(InputStream,
* String)
* @see org.apache.xmlgraphics.util.uri.DataURLUtil#createDataURL(InputStream, String)
*/
@Deprecated
public static String createDataURL(InputStream in, String mediatype)
throws IOException {
return org.apache.xmlgraphics.util.uri.DataURLUtil.createDataURL(in,
Expand All @@ -53,9 +54,9 @@ public static String createDataURL(InputStream in, String mediatype)
* @param writer a writer
* @throws IOException if not caught
* @deprecated
* @see org.apache.xmlgraphics.util.uri.DataURLUtil#writeDataURL(InputStream,
* String, Writer)
* @see org.apache.xmlgraphics.util.uri.DataURLUtil#writeDataURL(InputStream, String, Writer)
*/
@Deprecated
public static void writeDataURL(InputStream in, String mediatype,
Writer writer) throws IOException {
org.apache.xmlgraphics.util.uri.DataURLUtil.writeDataURL(in, mediatype,
Expand Down
1 change: 1 addition & 0 deletions fop-core/src/main/java/org/apache/fop/util/QName.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @deprecated Use the XML Graphics Commons variant instead!
*/
// @SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
@Deprecated
public class QName extends org.apache.xmlgraphics.util.QName {

private static final long serialVersionUID = -5225376740044770690L;
Expand Down
16 changes: 16 additions & 0 deletions fop-core/src/main/java/org/apache/fop/util/UnitConv.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Utility class for unit conversions.
* @deprecated use org.apache.xmlgraphics.util.UnitConv instead.
*/
@Deprecated
public final class UnitConv {

private UnitConv() {
Expand All @@ -34,18 +35,21 @@ private UnitConv() {
* conversion factory from millimeters to inches.
* @deprecated use org.apache.xmlgraphics.util.UnitConv.IN2MM instead.
*/
@Deprecated
public static final float IN2MM = org.apache.xmlgraphics.util.UnitConv.IN2MM;

/**
* conversion factory from centimeters to inches.
* @deprecated use org.apache.xmlgraphics.util.UnitConv.IN2CM instead.
*/
@Deprecated
public static final float IN2CM = org.apache.xmlgraphics.util.UnitConv.IN2CM;

/**
* conversion factory from inches to points.
* @deprecated use org.apache.xmlgraphics.util.UnitConv.IN2PT instead.
*/
@Deprecated
public static final int IN2PT = org.apache.xmlgraphics.util.UnitConv.IN2PT;

/**
Expand All @@ -54,6 +58,7 @@ private UnitConv() {
* @return the value in pt
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mm2pt(mm) instead.
*/
@Deprecated
public static double mm2pt(double mm) {
return org.apache.xmlgraphics.util.UnitConv.mm2pt(mm);
}
Expand All @@ -64,6 +69,7 @@ public static double mm2pt(double mm) {
* @return the value in mpt
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mm2mpt(mm) instead.
*/
@Deprecated
public static double mm2mpt(double mm) {
return org.apache.xmlgraphics.util.UnitConv.mm2mpt(mm);
}
Expand All @@ -74,6 +80,7 @@ public static double mm2mpt(double mm) {
* @return the value in mm
* @deprecated use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
*/
@Deprecated
public static double pt2mm(double pt) {
return org.apache.xmlgraphics.util.UnitConv.pt2mm(pt);
}
Expand All @@ -84,6 +91,7 @@ public static double pt2mm(double pt) {
* @return the value in inches
* @deprecated use org.apache.xmlgraphics.util.UnitConv.pt2mm(pt) instead.
*/
@Deprecated
public static double mm2in(double mm) {
return org.apache.xmlgraphics.util.UnitConv.mm2in(mm);
}
Expand All @@ -94,6 +102,7 @@ public static double mm2in(double mm) {
* @return the value in mm
* @deprecated use org.apache.xmlgraphics.util.UnitConv.in2mm(in) instead.
*/
@Deprecated
public static double in2mm(double in) {
return org.apache.xmlgraphics.util.UnitConv.in2mm(in);
}
Expand All @@ -104,6 +113,7 @@ public static double in2mm(double in) {
* @return the value in mpt
* @deprecated use org.apache.xmlgraphics.util.UnitConv.in2mpt(in) instead.
*/
@Deprecated
public static double in2mpt(double in) {
return org.apache.xmlgraphics.util.UnitConv.in2mpt(in);
}
Expand All @@ -114,6 +124,7 @@ public static double in2mpt(double in) {
* @return the value in pt
* @deprecated use org.apache.xmlgraphics.util.UnitConv.in2pt(in) instead.
*/
@Deprecated
public static double in2pt(double in) {
return org.apache.xmlgraphics.util.UnitConv.in2pt(in);
}
Expand All @@ -124,6 +135,7 @@ public static double in2pt(double in) {
* @return the value in inches
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mpt2in(mpt) instead.
*/
@Deprecated
public static double mpt2in(double mpt) {
return org.apache.xmlgraphics.util.UnitConv.mpt2in(mpt);
}
Expand All @@ -135,6 +147,7 @@ public static double mpt2in(double mpt) {
* @return the value in pixels
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mm2px(mm, resolution) instead.
*/
@Deprecated
public static double mm2px(double mm, int resolution) {
return org.apache.xmlgraphics.util.UnitConv.mm2px(mm, resolution);
}
Expand All @@ -146,6 +159,7 @@ public static double mm2px(double mm, int resolution) {
* @return the value in pixels
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mpt2px(mpt, resolution) instead.
*/
@Deprecated
public static double mpt2px(double mpt, int resolution) {
return org.apache.xmlgraphics.util.UnitConv.mpt2px(mpt, resolution);
}
Expand All @@ -156,6 +170,7 @@ public static double mpt2px(double mpt, int resolution) {
* @return a point-based transformation matrix
* @deprecated use org.apache.xmlgraphics.util.UnitConv.mptToPt(at) instead.
*/
@Deprecated
public static AffineTransform mptToPt(AffineTransform at) {
return org.apache.xmlgraphics.util.UnitConv.mptToPt(at);
}
Expand All @@ -166,6 +181,7 @@ public static AffineTransform mptToPt(AffineTransform at) {
* @return a millipoint-based transformation matrix
* @deprecated use org.apache.xmlgraphics.util.UnitConv.ptToMpt(at) instead.
*/
@Deprecated
public static AffineTransform ptToMpt(AffineTransform at) {
return org.apache.xmlgraphics.util.UnitConv.ptToMpt(at);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* @deprecated use org.apache.xmlgraphics.util.WriterOutputStream instead
* @see org.apache.xmlgraphics.util.WriterOutputStream
*/
@Deprecated
public class WriterOutputStream extends OutputStream {

private final org.apache.xmlgraphics.util.WriterOutputStream writerOutputStream;
Expand Down