Преглед на файлове

Some small javadoc and logging improvements/refinements.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImagePackageRedesign@602024 13f79535-47bb-0310-9956-ffa450edef68
Temp_ImagePackageRedesign
Jeremias Maerki преди 16 години
родител
ревизия
756a08cc60

+ 7
- 4
src/java/org/apache/fop/image2/impl/AbstractImageSessionContext.java Целия файл

@@ -169,16 +169,19 @@ public abstract class AbstractImageSessionContext implements ImageSessionContext
public Source needSource(String uri) throws FileNotFoundException {
Source src = getSource(uri);
if (src == null) {
log.debug("Creating new Source for " + uri);
if (log.isDebugEnabled()) {
log.debug("Creating new Source for " + uri);
}
src = newSource(uri);
if (src == null) {
throw new FileNotFoundException("Image not found: " + uri);
}
} else {
log.debug("Reusing Source for " + uri);
if (log.isDebugEnabled()) {
log.debug("Reusing Source for " + uri);
}
}
log.debug(" --> " + src);
log.debug(" --> " + Thread.currentThread().getName() + " " + Thread.currentThread());
return src;
}

+ 8
- 8
src/java/org/apache/fop/image2/pipeline/PipelineFactory.java Целия файл

@@ -101,8 +101,8 @@ public class PipelineFactory {
pipeline = new ImageProviderPipeline(manager.getCache(), loader);
} else {
//Need to use ImageConverters
if (log.isDebugEnabled()) {
log.debug("No ImageLoaderFactory found that can load this format directly."
if (log.isTraceEnabled()) {
log.trace("No ImageLoaderFactory found that can load this format directly."
+ " Trying ImageConverters instead...");
}
@@ -120,15 +120,15 @@ public class PipelineFactory {
dir);
ImageRepresentation origin = new ImageRepresentation(flavors[j]);
dijkstra.execute(origin, destination);
if (log.isDebugEnabled()) {
log.debug("Lowest penalty: " + dijkstra.getLowestPenalty(destination));
if (log.isTraceEnabled()) {
log.trace("Lowest penalty: " + dijkstra.getLowestPenalty(destination));
}
Vertex prev = destination;
Vertex pred = dijkstra.getPredecessor(destination);
if (pred == null) {
if (log.isDebugEnabled()) {
log.debug("No route found!");
if (log.isTraceEnabled()) {
log.trace("No route found!");
}
} else {
LinkedList stops = new LinkedList();
@@ -146,7 +146,7 @@ public class PipelineFactory {
ImageConversionEdge edge = (ImageConversionEdge)iter.next();
pipeline.addConverter(edge.getImageConverter());
}
if (log.isDebugEnabled()) {
if (pipeline != null && log.isDebugEnabled()) {
log.debug("Pipeline: " + pipeline);
}
return pipeline;
@@ -159,7 +159,7 @@ public class PipelineFactory {
}
}
if (log.isDebugEnabled()) {
if (pipeline != null && log.isDebugEnabled()) {
log.debug("Pipeline: " + pipeline);
}
return pipeline;

+ 1
- 3
src/java/org/apache/fop/pdf/PDFICCStream.java Целия файл

@@ -66,9 +66,7 @@ public class PDFICCStream extends PDFStream {
return length;
}
/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
protected void outputRawStreamData(OutputStream out) throws IOException {
cp.write(out);
}

+ 3
- 1
src/java/org/apache/fop/pdf/PDFObject.java Целия файл

@@ -83,7 +83,9 @@ public abstract class PDFObject implements PDFWritable {
*/
public void setObjectNumber(int objnum) {
this.objnum = objnum;
log.trace("Assigning " + this + " object number " + objnum);
if (log.isTraceEnabled()) {
log.trace("Assigning " + this + " object number " + objnum);
}
}

/**

Loading…
Отказ
Запис