mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-22 04:55:10 +00:00
resolves #1086 replace printStackTrace by java.util.logging.Logger
This commit is contained in:
parent
1f3dd64f7c
commit
aaf3a8ee24
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -40,6 +40,7 @@ import java.io.InputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class AFileZipEntry implements AFile {
|
||||
@ -75,7 +76,7 @@ public class AFileZipEntry implements AFile {
|
||||
zis.closeEntry();
|
||||
zis.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -88,7 +89,7 @@ public class AFileZipEntry implements AFile {
|
||||
is.close();
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -55,6 +55,7 @@ import net.sourceforge.plantuml.code.TranscoderUtil;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.error.PSystemErrorPreprocessor;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc2.PreprocessorModeSet;
|
||||
@ -197,7 +198,7 @@ public class BlockUml {
|
||||
final byte[] digest = msgDigest.digest();
|
||||
return coder.encode(digest);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return "NOETAG";
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
@ -49,6 +49,7 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
|
||||
public class DirWatcher2 {
|
||||
@ -98,7 +99,7 @@ public class DirWatcher2 {
|
||||
modifieds.put(f, new FileWatcher(files));
|
||||
return Collections.unmodifiableList(generatedImages);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
@ -49,6 +49,7 @@ import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.Line;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
@ -81,9 +82,9 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom {
|
||||
final BufferedImage im = getImage();
|
||||
return new Dimension2DDouble(im.getWidth(), im.getHeight());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return new Dimension2DDouble(42, 42);
|
||||
}
|
||||
@ -101,9 +102,9 @@ class EmbeddedDiagramDraw extends AbstractTextBlock implements Line, Atom {
|
||||
final UShape image = new UImage(new PixelImage(im, AffineTransformType.TYPE_BILINEAR));
|
||||
ug.draw(image);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -48,6 +48,7 @@ import net.sourceforge.plantuml.braille.BrailleCharFactory;
|
||||
import net.sourceforge.plantuml.braille.UGraphicBraille;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.StringBounderRaw;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.png.MetadataTag;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.svg.SvgGraphics;
|
||||
@ -56,9 +57,9 @@ import net.sourceforge.plantuml.ugraphic.debug.StringBounderDebug;
|
||||
|
||||
/**
|
||||
* Format for output files generated by PlantUML.
|
||||
*
|
||||
*
|
||||
* @author Arnaud Roques
|
||||
*
|
||||
*
|
||||
*/
|
||||
public enum FileFormat {
|
||||
PNG("image/png"),
|
||||
@ -96,7 +97,7 @@ public enum FileFormat {
|
||||
|
||||
/**
|
||||
* Returns the file format to be used for that format.
|
||||
*
|
||||
*
|
||||
* @return a string starting by a point.
|
||||
*/
|
||||
public String getFileSuffix() {
|
||||
@ -228,7 +229,7 @@ public enum FileFormat {
|
||||
|
||||
/**
|
||||
* Check if this file format is Encapsulated PostScript.
|
||||
*
|
||||
*
|
||||
* @return <code>true</code> for EPS.
|
||||
*/
|
||||
public boolean isEps() {
|
||||
@ -299,7 +300,7 @@ public enum FileFormat {
|
||||
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -40,6 +40,7 @@ import java.io.IOException;
|
||||
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class GeneratedImageImpl implements GeneratedImage {
|
||||
@ -88,7 +89,7 @@ public class GeneratedImageImpl implements GeneratedImage {
|
||||
return cmp;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return this.description.compareTo(this2.getDescription());
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,23 +35,34 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
public abstract class Log {
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class Log {
|
||||
|
||||
private static final long start = System.currentTimeMillis();
|
||||
|
||||
public synchronized static void debug(String s) {
|
||||
// noop
|
||||
}
|
||||
|
||||
public static void println(Object s) {
|
||||
// noop
|
||||
}
|
||||
|
||||
public static void header(String s) {
|
||||
// noop
|
||||
}
|
||||
|
||||
public synchronized static void info(String s) {
|
||||
if (OptionFlags.getInstance().isVerbose()) {
|
||||
ProgressBar.clear();
|
||||
System.err.println(format(s));
|
||||
Logger.error(format(s));
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized static void error(String s) {
|
||||
ProgressBar.clear();
|
||||
System.err.println(s);
|
||||
Logger.error(s);
|
||||
}
|
||||
|
||||
private static String format(String s) {
|
||||
@ -93,20 +104,5 @@ public abstract class Log {
|
||||
sb.append(" Mo - ");
|
||||
sb.append(s);
|
||||
return sb.toString();
|
||||
|
||||
}
|
||||
|
||||
public static void println(Object s) {
|
||||
// if (header2.get() == null) {
|
||||
// System.err.println("L = " + s);
|
||||
// } else {
|
||||
// System.err.println(header2.get() + " " + s);
|
||||
// }
|
||||
}
|
||||
|
||||
// private static final ThreadLocal<String> header2 = new ThreadLocal<>();
|
||||
//
|
||||
public static void header(String s) {
|
||||
// header2.set(s);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -41,6 +41,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.GraphvizUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
|
||||
@ -217,7 +218,7 @@ public class OptionFlags {
|
||||
ps.println();
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.error("Cannot open " + logData);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -229,7 +230,7 @@ public class OptionFlags {
|
||||
ps.println();
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.error("Cannot open " + logData);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -36,35 +36,52 @@
|
||||
package net.sourceforge.plantuml;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class ProgressBar {
|
||||
|
||||
private static final java.util.logging.Logger logger;
|
||||
|
||||
static {
|
||||
logger = java.util.logging.Logger.getLogger("com.plantuml.ProgressBar");
|
||||
logger.setUseParentHandlers(false);
|
||||
logger.addHandler(new StdErrHandler());
|
||||
}
|
||||
|
||||
private static boolean enable;
|
||||
private static String last = null;
|
||||
private static final AtomicInteger total = new AtomicInteger();
|
||||
private static final AtomicInteger done = new AtomicInteger();
|
||||
|
||||
private synchronized static void print(String message) {
|
||||
clear();
|
||||
System.err.print(message);
|
||||
logger.log(Level.INFO, buildClearMessage() + message);
|
||||
last = message;
|
||||
}
|
||||
|
||||
public synchronized static void clear() {
|
||||
if (last != null) {
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
System.err.print('\b');
|
||||
}
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
System.err.print(' ');
|
||||
}
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
System.err.print('\b');
|
||||
}
|
||||
}
|
||||
logger.log(Level.INFO, buildClearMessage());
|
||||
last = null;
|
||||
}
|
||||
|
||||
private static String buildClearMessage() {
|
||||
if (last != null) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
sb.append("\b");
|
||||
}
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
sb.append(" ");
|
||||
}
|
||||
for (int i = 0; i < last.length(); i++) {
|
||||
sb.append("\b");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static void incTotal(int nb) {
|
||||
total.addAndGet(nb);
|
||||
printBar(done.intValue(), total.intValue());
|
||||
@ -77,9 +94,7 @@ public class ProgressBar {
|
||||
if (total == 0) {
|
||||
return;
|
||||
}
|
||||
final String message = "[" + getBar(done, total) + "] " + done + "/" + total;
|
||||
print(message);
|
||||
|
||||
print("[" + getBar(done, total) + "] " + done + "/" + total);
|
||||
}
|
||||
|
||||
private static String getBar(int done, int total) {
|
||||
@ -101,4 +116,30 @@ public class ProgressBar {
|
||||
enable = value;
|
||||
}
|
||||
|
||||
private static class StdErrHandler extends Handler {
|
||||
public StdErrHandler() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
String message = record.getMessage();
|
||||
System.err.print(message);
|
||||
this.flush();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
System.err.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Override {@code StreamHandler.close} to do a flush but not to close the output stream.
|
||||
* That is, we do <b>not</b> close {@code System.err}.
|
||||
*/
|
||||
@Override
|
||||
public void close() {
|
||||
flush();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -58,6 +58,7 @@ import net.sourceforge.plantuml.code.NoPlantumlCompressionException;
|
||||
import net.sourceforge.plantuml.code.Transcoder;
|
||||
import net.sourceforge.plantuml.code.TranscoderUtil;
|
||||
import net.sourceforge.plantuml.ftp.FtpServer;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.picoweb.PicoWebServer;
|
||||
import net.sourceforge.plantuml.png.MetadataTag;
|
||||
import net.sourceforge.plantuml.preproc.Stdlib;
|
||||
@ -403,7 +404,7 @@ public class Run {
|
||||
return;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -426,9 +427,9 @@ public class Run {
|
||||
try {
|
||||
manageFileInternal(f, option, error);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
incDone(error.hasError());
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -50,6 +50,7 @@ import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.PBEKeySpec;
|
||||
|
||||
import net.sourceforge.plantuml.code.AsciiEncoder;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class SignatureUtils {
|
||||
@ -77,10 +78,10 @@ public class SignatureUtils {
|
||||
final byte[] digest = getMD5raw(s);
|
||||
return toString(digest);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
}
|
||||
}
|
||||
@ -104,10 +105,10 @@ public class SignatureUtils {
|
||||
assert digest.length == 16;
|
||||
return toHexString(digest);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
}
|
||||
}
|
||||
@ -118,10 +119,10 @@ public class SignatureUtils {
|
||||
assert digest.length == 64;
|
||||
return toHexString(digest);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
}
|
||||
}
|
||||
@ -160,10 +161,10 @@ public class SignatureUtils {
|
||||
final byte[] digest = msgDigest.digest();
|
||||
return toString(digest);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
}
|
||||
}
|
||||
@ -194,10 +195,10 @@ public class SignatureUtils {
|
||||
final byte[] digest = msgDigest.digest();
|
||||
return toString(digest);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException(e);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -63,6 +63,7 @@ import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.DotSplines;
|
||||
import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.skin.ActorStyle;
|
||||
import net.sourceforge.plantuml.skin.ArrowDirection;
|
||||
import net.sourceforge.plantuml.skin.Padder;
|
||||
@ -111,7 +112,7 @@ public class SkinParam implements ISkinParam {
|
||||
try {
|
||||
this.styleBuilder = getCurrentStyleBuilderInternal();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return styleBuilder;
|
||||
@ -178,7 +179,7 @@ public class SkinParam implements ISkinParam {
|
||||
this.muteStyle(modifiedStyle);
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -57,6 +57,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.api.ThemeStyle;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
@ -159,7 +160,7 @@ public abstract class SourceFileReaderAbstract implements ISourceFileReader {
|
||||
try {
|
||||
system = blockUml.getDiagram();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
if (OptionFlags.getInstance().isSilentlyCompletelyIgnoreErrors() || noerror) {
|
||||
continue;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -51,6 +51,7 @@ import java.awt.image.BufferedImage;
|
||||
import java.net.URL;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class Splash extends Window implements MouseListener, MouseMotionListener {
|
||||
@ -139,7 +140,7 @@ public class Splash extends Window implements MouseListener, MouseMotionListener
|
||||
try {
|
||||
Desktop.getDesktop().browse(new URL("https://plantuml.com").toURI());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -261,7 +261,7 @@ public abstract class TitledDiagram extends AbstractPSystem implements Diagram,
|
||||
final AnimationDecoder animationDecoder = new AnimationDecoder(animationData);
|
||||
this.animation = Animation.create(animationDecoder.decode());
|
||||
// } catch (ScriptException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
// }
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -65,6 +65,7 @@ import net.sourceforge.plantuml.fun.IconLoader;
|
||||
import net.sourceforge.plantuml.graphic.GraphicPosition;
|
||||
import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.mjpeg.MJPEGGenerator;
|
||||
import net.sourceforge.plantuml.pdf.PdfConverter;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
@ -135,13 +136,13 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
this.lastInfo = new Dimension2DDouble(imageData.getWidth(), imageData.getHeight());
|
||||
return imageData;
|
||||
} catch (NoStyleAvailableException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
exportDiagramError(os, e, fileFormatOption, null);
|
||||
} catch (UnparsableGraphvizException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
exportDiagramError(os, e.getCause(), fileFormatOption, e.getGraphvizVersion());
|
||||
} catch (Throwable e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
exportDiagramError(os, e, fileFormatOption, null);
|
||||
}
|
||||
return ImageDataSimple.error();
|
||||
@ -170,7 +171,7 @@ public abstract class UmlDiagram extends TitledDiagram implements Diagram, Annot
|
||||
im2 = utils.exportFlashcode(flash, Color.BLACK, Color.WHITE);
|
||||
} catch (Throwable e) {
|
||||
Log.error("Issue in flashcode generation " + e);
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
}
|
||||
if (im2 != null)
|
||||
GraphvizCrash.addDecodeHint(strings);
|
||||
|
@ -47,6 +47,7 @@ import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||
import net.sourceforge.plantuml.command.regex.Pattern2;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||
|
||||
@ -100,7 +101,7 @@ public class PSystemXearthFactory extends PSystemBasicFactory<PSystemXearth> {
|
||||
return system;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -44,6 +44,8 @@ import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
import org.apache.tools.ant.types.FileList;
|
||||
@ -84,7 +86,7 @@ public class CheckZipTask extends Task {
|
||||
manageFileList(fileList);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new BuildException(e.toString());
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -46,6 +46,8 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.DirectoryScanner;
|
||||
import org.apache.tools.ant.Task;
|
||||
@ -130,10 +132,10 @@ public class PlantUmlTask extends Task {
|
||||
}
|
||||
this.log("Nb images generated: " + nbFiles.get());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new BuildException(e.toString());
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new BuildException(e.toString());
|
||||
}
|
||||
|
||||
|
@ -3,12 +3,12 @@
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,6 +35,8 @@ import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzed implements INumberAnalyzed {
|
||||
|
||||
@ -121,7 +123,7 @@ public class NumberAnalyzed implements INumberAnalyzed {
|
||||
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
|
||||
st.nextToken(), 36), Long.parseLong(st.nextToken(), 36));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.info("Error reading " + value);
|
||||
return null;
|
||||
}
|
||||
|
@ -3,12 +3,12 @@
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -34,6 +34,7 @@ import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzed2 implements INumberAnalyzed {
|
||||
@ -95,7 +96,7 @@ public class NumberAnalyzed2 implements INumberAnalyzed {
|
||||
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
|
||||
st.nextToken(), 36), Long.parseLong(st.nextToken(), 36));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.info("Error reading " + value);
|
||||
return null;
|
||||
}
|
||||
|
@ -3,12 +3,12 @@
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -34,6 +34,7 @@ import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.annotation.HaxeIgnored;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
@HaxeIgnored
|
||||
public class NumberAnalyzedDated extends NumberAnalyzed {
|
||||
@ -104,7 +105,7 @@ public class NumberAnalyzedDated extends NumberAnalyzed {
|
||||
Long.parseLong(st.nextToken(), 36), Long.parseLong(st.nextToken(), 36), Long.parseLong(
|
||||
st.nextToken(), 36), st.nextToken());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.info("Error reading " + value);
|
||||
return null;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,6 +35,8 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.api;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public final class TimeoutExecutor {
|
||||
@ -53,7 +55,7 @@ public final class TimeoutExecutor {
|
||||
mainThread.join(ms);
|
||||
} catch (InterruptedException e) {
|
||||
System.err.println("TimeoutExecutorA " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return false;
|
||||
} finally {
|
||||
done = mainThread.done.get();
|
||||
@ -80,7 +82,7 @@ public final class TimeoutExecutor {
|
||||
done.set(true);
|
||||
} catch (InterruptedException e) {
|
||||
System.err.println("TimeoutExecutorB " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
package net.sourceforge.plantuml.argon2.blake2;
|
||||
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import static net.sourceforge.plantuml.argon2.blake2.Blake2b.Engine.Assert.*;
|
||||
import static net.sourceforge.plantuml.argon2.blake2.Blake2b.Engine.LittleEndian.*;
|
||||
|
||||
@ -896,7 +897,7 @@ public interface Blake2b {
|
||||
public final static String exclusiveLowerBound = "'%s' %d is <= %d";
|
||||
public final static String inclusiveLowerBound = "'%s' %d is < %d";
|
||||
static <T extends Number> String assertFail(final String name, final T v, final String err, final T spec) {
|
||||
new Exception().printStackTrace();
|
||||
Logger.error(new Exception());
|
||||
return String.format(err, name, v, spec);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -41,6 +41,7 @@ import java.io.IOException;
|
||||
|
||||
import net.sourceforge.plantuml.FileUtils;
|
||||
import net.sourceforge.plantuml.brotli.BrotliInputStream;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class CompressionBrotli implements Compression {
|
||||
|
||||
@ -56,7 +57,7 @@ public class CompressionBrotli implements Compression {
|
||||
FileUtils.copyToStream(brotli, result);
|
||||
return ByteArray.from(result.toByteArray());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new NoPlantumlCompressionException(e);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -91,7 +91,7 @@ public class CompressionZlibAttic implements Compression {
|
||||
|
||||
return ByteArray.from(result);
|
||||
} catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
throw new NoPlantumlCompressionException(e);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ public class CompressionZlibAttic implements Compression {
|
||||
final byte[] result = copyArray(tmp, resultLength);
|
||||
return result;
|
||||
} catch (DataFormatException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
throw new IOException(e.toString());
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,6 +35,8 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.code;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@ -56,7 +58,7 @@ public class Upf9Encoder {
|
||||
if (c == Upf9Decoder.decodeChar(new ByteArrayInputStream(result)))
|
||||
return true;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.command;
|
||||
@ -64,7 +64,7 @@ public class CommandSkinParam extends SingleLineCommand2<TitledDiagram> {
|
||||
diagram.setParam(arg.get("NAME", 0), arg.get("VALUE", 0));
|
||||
return CommandExecutionResult.ok();
|
||||
} catch (NoStyleAvailableException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
return CommandExecutionResult.error("General failure: no style available.");
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.command;
|
||||
@ -39,6 +39,7 @@ import java.util.Objects;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public class ProtectedCommand<S extends Diagram> implements Command<S> {
|
||||
@ -58,12 +59,11 @@ public class ProtectedCommand<S extends Diagram> implements Command<S> {
|
||||
// }
|
||||
return result;
|
||||
} catch (Throwable t) {
|
||||
Log.error("Error " + t);
|
||||
t.printStackTrace();
|
||||
Logger.error("Error ", t);
|
||||
String msg = "You should send a mail to plantuml@gmail.com or post to http://plantuml.com/qa with this log (V"
|
||||
+ Version.versionString() + ")";
|
||||
Log.error(msg);
|
||||
msg += " " + t.toString();
|
||||
Logger.error(msg);
|
||||
msg += " " + t;
|
||||
return CommandExecutionResult.error(msg, t);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.command;
|
||||
@ -106,7 +106,7 @@ public class SkinLoader {
|
||||
}
|
||||
return CommandExecutionResult.ok();
|
||||
} catch (NoStyleAvailableException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
return CommandExecutionResult.error("General failure: no style available.");
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.creole.atom;
|
||||
@ -54,6 +54,7 @@ import net.sourceforge.plantuml.graphic.FontConfiguration;
|
||||
import net.sourceforge.plantuml.graphic.ImgValign;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TileImageSvg;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.security.SURL;
|
||||
@ -120,38 +121,38 @@ public class AtomImg extends AbstractAtom implements Atom {
|
||||
try {
|
||||
// Check if valid URL
|
||||
if (src.startsWith("http:") || src.startsWith("https:")) {
|
||||
if (src.endsWith(".svg"))
|
||||
if (src.endsWith(".svg"))
|
||||
return buildSvgFromUrl(src, fc, SURL.create(src), scale, url);
|
||||
|
||||
|
||||
return buildRasterFromUrl(src, fc, SURL.create(src), scale, url);
|
||||
}
|
||||
final SFile f = FileSystem.getInstance().getFile(src);
|
||||
if (f.exists() == false) {
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
return AtomTextUtils.createLegacy("(File not found: " + f.getPrintablePath() + ")", fc);
|
||||
|
||||
|
||||
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
|
||||
}
|
||||
if (f.getName().endsWith(".svg")) {
|
||||
final String tmp = FileUtils.readSvg(f);
|
||||
if (tmp == null)
|
||||
if (tmp == null)
|
||||
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
|
||||
|
||||
|
||||
return new AtomImgSvg(new TileImageSvg(tmp, scale));
|
||||
}
|
||||
final BufferedImage read = f.readRasterImageFromFile();
|
||||
if (read == null) {
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
return AtomTextUtils.createLegacy("(Cannot decode: " + f.getPrintablePath() + ")", fc);
|
||||
|
||||
|
||||
return AtomTextUtils.createLegacy("(Cannot decode)", fc);
|
||||
}
|
||||
return new AtomImg(f.readRasterImageFromFile(), scale, url, src);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
Logger.error(e);
|
||||
if (SecurityUtils.getSecurityProfile() == SecurityProfile.UNSECURE)
|
||||
return AtomTextUtils.createLegacy("ERROR " + e.toString(), fc);
|
||||
|
||||
|
||||
return AtomTextUtils.createLegacy("ERROR", fc);
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram;
|
||||
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.cucadiagram;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class GroupPrinter {
|
||||
@ -90,7 +91,7 @@ public class GroupPrinter {
|
||||
new GroupPrinter(pw).printGroup(rootGroup);
|
||||
pw.println("</html>");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram.dot;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.OptionFlags;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
abstract class AbstractGraphviz implements Graphviz {
|
||||
@ -75,7 +76,7 @@ abstract class AbstractGraphviz implements Graphviz {
|
||||
this.dotString = dotString;
|
||||
this.type = Objects.requireNonNull(type);
|
||||
}
|
||||
|
||||
|
||||
protected boolean findExecutableOnPath() {
|
||||
return true;
|
||||
}
|
||||
@ -116,7 +117,7 @@ abstract class AbstractGraphviz implements Graphviz {
|
||||
// }
|
||||
Log.info("Ending process ok");
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.error("Error: " + e);
|
||||
Log.error("The command was " + cmd);
|
||||
Log.error("");
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram.dot;
|
||||
@ -51,7 +51,7 @@ public class DebugTrace {
|
||||
try {
|
||||
pw = out.createPrintWriter();
|
||||
} catch (FileNotFoundException e) {
|
||||
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
return pw;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram.dot;
|
||||
@ -45,6 +45,7 @@ import java.util.regex.Pattern;
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.security.SecurityProfile;
|
||||
import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
@ -186,7 +187,7 @@ public class GraphvizUtils {
|
||||
try {
|
||||
return create(null, "png").graphviz244onWindows();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -227,8 +228,8 @@ public class GraphvizUtils {
|
||||
result.add(red + err);
|
||||
|
||||
} catch (Exception e) {
|
||||
result.add(red + e.toString());
|
||||
e.printStackTrace();
|
||||
result.add(red + e);
|
||||
Logger.error(e);
|
||||
error = -1;
|
||||
}
|
||||
return error;
|
||||
@ -268,8 +269,8 @@ public class GraphvizUtils {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
result.add(red + e.toString());
|
||||
e.printStackTrace();
|
||||
result.add(red + e);
|
||||
Logger.error(e);
|
||||
error = -5;
|
||||
}
|
||||
} else {
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram.dot;
|
||||
@ -43,6 +43,7 @@ import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.ISkinParam;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.windowsdot.WindowsDotArchive;
|
||||
|
||||
class GraphvizWindowsOld extends AbstractGraphviz {
|
||||
@ -66,7 +67,7 @@ class GraphvizWindowsOld extends AbstractGraphviz {
|
||||
try {
|
||||
return GraphvizUtils.getDotVersion() == 244;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.cucadiagram.dot;
|
||||
@ -44,6 +44,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
import net.sourceforge.plantuml.OptionFlags;
|
||||
import net.sourceforge.plantuml.api.MyRunnable;
|
||||
import net.sourceforge.plantuml.api.TimeoutExecutor;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class ProcessRunner {
|
||||
@ -162,14 +163,14 @@ public class ProcessRunner {
|
||||
try {
|
||||
process = Runtime.getRuntime().exec(cmd, null, dir == null ? null : dir.conv());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
changeState.lock();
|
||||
try {
|
||||
state = ProcessState.IO_EXCEPTION1(e);
|
||||
} finally {
|
||||
changeState.unlock();
|
||||
}
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return;
|
||||
}
|
||||
errorStream = new ThreadStream(process.getErrorStream(), null);
|
||||
@ -191,7 +192,7 @@ public class ProcessRunner {
|
||||
} finally {
|
||||
changeState.unlock();
|
||||
}
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -248,9 +249,9 @@ public class ProcessRunner {
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
System.err.println("ProcessRunnerA " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
sb.append('\n');
|
||||
sb.append(e.toString());
|
||||
sb.append(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -269,7 +270,7 @@ public class ProcessRunner {
|
||||
is.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,7 +280,7 @@ public class ProcessRunner {
|
||||
os.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.dedication;
|
||||
@ -41,6 +41,7 @@ import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.math.BigInteger;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.utils.MTRandom;
|
||||
|
||||
public class DedicationCrypted implements Dedication {
|
||||
@ -113,7 +114,7 @@ public class DedicationCrypted implements Dedication {
|
||||
this.solution = line;
|
||||
return img;
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.dedication;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
|
||||
@ -61,7 +63,7 @@ public class DedicationSimple implements Dedication {
|
||||
current = decoded.toByteArray(512);
|
||||
return PSystemDedication.getBufferedImage(new ByteArrayInputStream(current));
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.dedication;
|
||||
@ -44,6 +44,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.sourceforge.plantuml.FileUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class Dedications {
|
||||
|
||||
@ -64,7 +65,7 @@ public class Dedications {
|
||||
all.add(secret(1, "ae8a7cf3997ccd6418866fc59e596502e1bd1c0265bba2fc380ad7f51c76518f", new BigInteger(
|
||||
"987988542836850639056829173787067531749177506648884857100630852970876999799588072360773169026225182488073794585127241896588994816566037813451743416913613428321215803586563629080034406083114565732322220091545330060636171674602040157")));
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,6 +47,7 @@ import net.sourceforge.plantuml.PlainDiagram;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
import net.sourceforge.plantuml.ugraphic.PixelImage;
|
||||
@ -87,7 +88,7 @@ public class PSystemDedication extends PlainDiagram {
|
||||
// final VP8Frame frame = vp8Decoder.getFrame();
|
||||
// return frame.getBufferedImage();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -53,6 +53,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.svek.GraphvizCrash;
|
||||
|
||||
@ -85,7 +86,7 @@ public class PSystemDitaa extends AbstractPSystem {
|
||||
this.processingOptions.getClass().getMethod("setAllCornersAreRound", boolean.class)
|
||||
.invoke(this.processingOptions, allCornersAreRound);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
this.processingOptions = null;
|
||||
}
|
||||
this.transparentBackground = transparentBackground;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.donors;
|
||||
@ -57,6 +57,7 @@ import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
import net.sourceforge.plantuml.ugraphic.PixelImage;
|
||||
@ -97,7 +98,7 @@ public class PSystemDonors extends PlainDiagram {
|
||||
|
||||
/*
|
||||
* Special thanks to our sponsors and donors:
|
||||
*
|
||||
*
|
||||
* - Noam Tamim
|
||||
*/
|
||||
|
||||
@ -153,7 +154,7 @@ public class PSystemDonors extends PlainDiagram {
|
||||
lines.add(st.nextToken());
|
||||
}
|
||||
} catch (NoPlantumlCompressionException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return lines;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.eggs;
|
||||
@ -41,6 +41,7 @@ import net.sourceforge.plantuml.AbstractPSystem;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.command.PSystemSingleLineFactory;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class PSystemAppleTwoFactory extends PSystemSingleLineFactory {
|
||||
|
||||
@ -53,7 +54,7 @@ public class PSystemAppleTwoFactory extends PSystemSingleLineFactory {
|
||||
return new PSystemAppleTwo(source);
|
||||
} catch (IOException e) {
|
||||
Log.error("Error " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.eggs;
|
||||
@ -41,6 +41,7 @@ import net.sourceforge.plantuml.AbstractPSystem;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.command.PSystemSingleLineFactory;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class PSystemRIPFactory extends PSystemSingleLineFactory {
|
||||
|
||||
@ -51,7 +52,7 @@ public class PSystemRIPFactory extends PSystemSingleLineFactory {
|
||||
return new PSystemRIP(source);
|
||||
} catch (IOException e) {
|
||||
Log.error("Error " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.elk;
|
||||
@ -67,13 +67,13 @@ import net.sourceforge.plantuml.cucadiagram.entity.EntityFactory;
|
||||
|
||||
/*
|
||||
* You can choose between real "org.eclipse.elk..." classes or proxied "net.sourceforge.plantuml.elk.proxy..."
|
||||
*
|
||||
*
|
||||
* Using proxied classes allows to compile PlantUML without having ELK available on the classpath.
|
||||
* Since GraphViz is the default layout engine up to now, we do not want to enforce the use of ELK just for compilation.
|
||||
* (for people not using maven)
|
||||
*
|
||||
*
|
||||
* If you are debugging, you should probably switch to "org.eclipse.elk..." classes
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -111,6 +111,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.USymbolFolder;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
@ -134,7 +135,7 @@ import net.sourceforge.plantuml.ugraphic.color.HColorUtils;
|
||||
|
||||
/*
|
||||
* Some notes:
|
||||
*
|
||||
*
|
||||
https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure.html
|
||||
https://www.eclipse.org/elk/documentation/tooldevelopers/graphdatastructure/coordinatesystem.html
|
||||
|
||||
@ -521,7 +522,7 @@ public class CucaDiagramFileMakerElk implements CucaDiagramFileMaker {
|
||||
}
|
||||
|
||||
static private List<String> getFailureText3(Throwable exception) {
|
||||
exception.printStackTrace();
|
||||
Logger.error(exception);
|
||||
final List<String> strings = new ArrayList<>();
|
||||
strings.add("An error has occured : " + exception);
|
||||
final String quote = StringUtils.rot(QuoteUtils.getSomeQuote());
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,6 +35,8 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.elk.proxy;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
@ -48,7 +50,7 @@ public class Reflect {
|
||||
try {
|
||||
return Class.forName(className);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -63,7 +65,7 @@ public class Reflect {
|
||||
}
|
||||
throw new UnsupportedOperationException(name);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -74,7 +76,7 @@ public class Reflect {
|
||||
final Field field = cl.getField(fieldname);
|
||||
return field.get(null);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -84,7 +86,7 @@ public class Reflect {
|
||||
final Class<?> cl = Class.forName(className);
|
||||
return cl.newInstance();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -95,7 +97,7 @@ public class Reflect {
|
||||
final Constructor<?> m = cl.getConstructor(arg1.getClass());
|
||||
return m.newInstance(arg1);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -106,7 +108,7 @@ public class Reflect {
|
||||
final Constructor<?> m = cl.getConstructor(Double.TYPE, Double.TYPE, Double.TYPE, Double.TYPE);
|
||||
return m.newInstance(arg1, arg2, arg3, arg4);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -117,7 +119,7 @@ public class Reflect {
|
||||
final Field f = cl.getField(fieldName);
|
||||
return f.get(null);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -128,7 +130,7 @@ public class Reflect {
|
||||
final Method m = cl.getMethod(method);
|
||||
return m.invoke(null);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -139,7 +141,7 @@ public class Reflect {
|
||||
final Method m = cl.getMethod(method, arg1.getClass());
|
||||
return m.invoke(null, arg1);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -150,7 +152,7 @@ public class Reflect {
|
||||
final Method m = cl.getMethod(method, arg1.getClass(), arg2.getClass());
|
||||
return m.invoke(null, arg1, arg2);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -161,7 +163,7 @@ public class Reflect {
|
||||
final Method m = getStaticMethod(cl, method, 1);
|
||||
return m.invoke(null, arg1);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -172,7 +174,7 @@ public class Reflect {
|
||||
final Method m = getStaticMethod(cl, method, 2);
|
||||
return m.invoke(null, arg1, arg2);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -191,7 +193,7 @@ public class Reflect {
|
||||
final Method m = instance.getClass().getMethod(method);
|
||||
return m.invoke(instance);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -201,7 +203,7 @@ public class Reflect {
|
||||
final Method m = instance.getClass().getMethod(method, arg1.getClass());
|
||||
return m.invoke(instance, arg1);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -211,7 +213,7 @@ public class Reflect {
|
||||
final Method m = instance.getClass().getMethod(method, arg1.getClass(), arg2.getClass());
|
||||
return m.invoke(instance, arg1, arg2);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
@ -221,7 +223,7 @@ public class Reflect {
|
||||
final Method m = getMethod(instance, method, 2);
|
||||
return m.invoke(instance, arg1, arg2);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
throw new IllegalArgumentException(t);
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.sourceforge.plantuml.emoji.data.Dummy;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
|
||||
@ -29,7 +30,7 @@ public class Emoji {
|
||||
new Emoji(s);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +88,7 @@ public class Emoji {
|
||||
try {
|
||||
loadIfNeed();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
nano.drawU(ug, scale, colorForMonochrome);
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.emoji;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.sprite.Sprite;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
@ -95,7 +96,7 @@ public class SpriteSvgNanoParser implements Sprite {
|
||||
try {
|
||||
return new SpriteSvgNanoParser(SImageIO.read(is));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.ftp;
|
||||
@ -54,6 +54,7 @@ import java.util.StringTokenizer;
|
||||
import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.FileUtils;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
|
||||
class FtpLoop implements Runnable {
|
||||
@ -327,7 +328,7 @@ class FtpLoop implements Runnable {
|
||||
try {
|
||||
runInternal();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.ftp;
|
||||
@ -50,6 +50,7 @@ import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class FtpServer {
|
||||
|
||||
@ -114,7 +115,7 @@ public class FtpServer {
|
||||
try {
|
||||
connexion.processImage(name);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -43,6 +43,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
|
||||
public class IconLoader {
|
||||
@ -93,7 +94,7 @@ public class IconLoader {
|
||||
is.close();
|
||||
return image;
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
@ -44,6 +44,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.command.regex.Matcher2;
|
||||
import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||
import net.sourceforge.plantuml.command.regex.Pattern2;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.security.SURL;
|
||||
|
||||
@ -123,8 +124,8 @@ public class Img implements HtmlCommand {
|
||||
|
||||
return new Img(new TileImage(f.readRasterImageFromFile(), valign, vspace));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return new Text("ERROR " + e.toString());
|
||||
Logger.error(e);
|
||||
return new Text("ERROR " + e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.graphic;
|
||||
@ -139,7 +139,7 @@ public class UnusedSpace {
|
||||
// ImageIO.write(im, "png", SecurityUtils.File("c:/img" + cpt + ".png"));
|
||||
// cpt++;
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.hcl;
|
||||
@ -49,6 +49,7 @@ import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.jsondiagram.JsonDiagram;
|
||||
import net.sourceforge.plantuml.jsondiagram.StyleExtractor;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class HclDiagramFactory extends PSystemAbstractFactory {
|
||||
|
||||
@ -76,7 +77,7 @@ public class HclDiagramFactory extends PSystemAbstractFactory {
|
||||
HclParser parser = new HclParser(list);
|
||||
data = parser.parseMe();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
final JsonDiagram result = new JsonDiagram(style, source, UmlDiagramType.HCL, data, highlighted);
|
||||
// if (styleExtractor != null) {
|
||||
|
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.command.regex.IRegex;
|
||||
import net.sourceforge.plantuml.command.regex.RegexConcat;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
import net.sourceforge.plantuml.command.regex.RegexResult;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.theme.ThemeUtils;
|
||||
|
||||
public class CommandHelpTheme extends SingleLineCommand2<Help> {
|
||||
@ -76,7 +77,7 @@ public class CommandHelpTheme extends SingleLineCommand2<Help> {
|
||||
} catch (IOException e) {
|
||||
final String message = "Unexpected error listing themes: " + e.getMessage();
|
||||
Log.error(message);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return CommandExecutionResult.error(message);
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.jcckit;
|
||||
@ -49,6 +49,7 @@ import net.sourceforge.plantuml.command.regex.MyPattern;
|
||||
import net.sourceforge.plantuml.command.regex.Pattern2;
|
||||
import net.sourceforge.plantuml.core.DiagramType;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public class PSystemJcckitFactory extends PSystemBasicFactory<PSystemJcckit> {
|
||||
|
||||
@ -99,7 +100,7 @@ public class PSystemJcckitFactory extends PSystemBasicFactory<PSystemJcckit> {
|
||||
// p.load(new ByteArrayInputStream(data.toString().getBytes("ISO-8859-1")));
|
||||
} catch (IOException e) {
|
||||
Log.error("Error " + e);
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
return new PSystemJcckit(source, p, width, height);
|
||||
|
57
src/net/sourceforge/plantuml/log/Logger.java
Normal file
57
src/net/sourceforge/plantuml/log/Logger.java
Normal file
@ -0,0 +1,57 @@
|
||||
package net.sourceforge.plantuml.log;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Formatter;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class Logger {
|
||||
|
||||
private static final java.util.logging.Logger logger;
|
||||
|
||||
static {
|
||||
logger = java.util.logging.Logger.getLogger("com.plantuml");
|
||||
logger.setUseParentHandlers(false);
|
||||
ConsoleHandler handler = new ConsoleHandler();
|
||||
handler.setFormatter(new Formatter() {
|
||||
@Override
|
||||
public synchronized String format(LogRecord lr) {
|
||||
String throwable = "";
|
||||
if (lr.getThrown() != null) {
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
pw.println();
|
||||
lr.getThrown().printStackTrace(pw);
|
||||
pw.close();
|
||||
throwable = sw.toString().trim();
|
||||
}
|
||||
String message = lr.getMessage();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (message.trim().length() > 0) {
|
||||
sb.append(message);
|
||||
sb.append(System.lineSeparator());
|
||||
}
|
||||
if (throwable.length() > 0) {
|
||||
sb.append(throwable);
|
||||
sb.append(System.lineSeparator());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
});
|
||||
logger.addHandler(handler);
|
||||
}
|
||||
|
||||
public static void error(Throwable thrown) {
|
||||
logger.log(Level.SEVERE, "", thrown);
|
||||
}
|
||||
|
||||
public static void error(String msg, Throwable thrown) {
|
||||
logger.log(Level.SEVERE, msg, thrown);
|
||||
}
|
||||
|
||||
public static void error(String msg) {
|
||||
logger.log(Level.SEVERE, msg);
|
||||
}
|
||||
}
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.math;
|
||||
@ -47,6 +47,8 @@ import java.lang.reflect.Method;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import org.w3c.dom.DOMImplementation;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
@ -73,7 +75,7 @@ public class ConverterSvg {
|
||||
Class.forName("org.scilab.forge.jlatexmath.greek.GreekRegistration").newInstance());
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.math;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
@ -93,7 +94,7 @@ public class PSystemLatex extends AbstractPSystem {
|
||||
scale = scale1;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
} else if (lineLower.startsWith("dpi ")) {
|
||||
final String value = line.substring("dpi ".length());
|
||||
@ -103,7 +104,7 @@ public class PSystemLatex extends AbstractPSystem {
|
||||
scale = dpi1 / 96;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
} else {
|
||||
this.latex = line;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.math;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.core.DiagramDescription;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.ugraphic.color.ColorMapperIdentity;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColor;
|
||||
import net.sourceforge.plantuml.ugraphic.color.HColorSet;
|
||||
@ -93,7 +94,7 @@ public class PSystemMath extends AbstractPSystem {
|
||||
scale = scale1;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
} else if (lineLower.startsWith("dpi ")) {
|
||||
final String value = line.substring("dpi ".length());
|
||||
@ -103,7 +104,7 @@ public class PSystemMath extends AbstractPSystem {
|
||||
scale = dpi1 / 96;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
} else {
|
||||
this.math = line;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.math;
|
||||
@ -52,6 +52,7 @@ import net.sourceforge.plantuml.api.ImageDataSimple;
|
||||
import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.eps.EpsGraphics;
|
||||
import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
@ -73,7 +74,7 @@ public class ScientificEquationSafe {
|
||||
try {
|
||||
return new ScientificEquationSafe(formula, new AsciiMath(formula));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.info("Error parsing " + formula);
|
||||
return new ScientificEquationSafe(formula, null);
|
||||
}
|
||||
@ -83,7 +84,7 @@ public class ScientificEquationSafe {
|
||||
try {
|
||||
return new ScientificEquationSafe(formula, new LatexBuilder(formula));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.info("Error parsing " + formula);
|
||||
return new ScientificEquationSafe(formula, null);
|
||||
}
|
||||
@ -129,7 +130,7 @@ public class ScientificEquationSafe {
|
||||
if (equation != null) {
|
||||
System.err.println("Latex=" + equation.getSource());
|
||||
}
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
private TextBlockBackcolored getRollback() {
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -126,7 +126,7 @@ public class MindMap implements UDrawable {
|
||||
|
||||
return this.regular.add(skinParam.getCurrentStyleBuilder(), backColor, level, label, shape, stereotype);
|
||||
} catch (NoStyleAvailableException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
return CommandExecutionResult.error("General failure: no style available.");
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.openiconic;
|
||||
@ -48,6 +48,7 @@ import net.sourceforge.plantuml.Dimension2DDouble;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.openiconic.data.DummyIcon;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.ugraphic.UGraphic;
|
||||
@ -69,7 +70,7 @@ public class OpenIcon {
|
||||
try {
|
||||
return new OpenIcon(is, name);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -35,6 +35,8 @@
|
||||
*/
|
||||
package net.sourceforge.plantuml.pdf;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@ -72,7 +74,7 @@ public class PdfConverter {
|
||||
final Method execute = clSVGConverter.getMethod("execute");
|
||||
execute.invoke(converter);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
if (pdfFile.exists() == false) {
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,9 +30,9 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
* Highly inspired from https://www.ssaurel.com/blog/create-a-simple-http-web-server-in-java
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.picoweb;
|
||||
|
||||
@ -69,6 +69,7 @@ import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.error.PSystemError;
|
||||
import net.sourceforge.plantuml.error.PSystemErrorUtils;
|
||||
import net.sourceforge.plantuml.graphic.QuoteUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
@ -138,7 +139,7 @@ public class PicoWebServer implements Runnable {
|
||||
try {
|
||||
sendError(e, out);
|
||||
} catch (Throwable e1) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
@ -146,7 +147,7 @@ public class PicoWebServer implements Runnable {
|
||||
out.close();
|
||||
connect.close();
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package net.sourceforge.plantuml.picoweb;
|
||||
|
||||
import net.sourceforge.plantuml.json.Json;
|
||||
import net.sourceforge.plantuml.json.JsonObject;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.stream.MemoryCacheImageInputStream;
|
||||
@ -294,7 +295,7 @@ public class PicoWebServerTest {
|
||||
try {
|
||||
PicoWebServer.serverLoop(serverSocket);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.preproc;
|
||||
@ -43,6 +43,7 @@ import java.nio.charset.Charset;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SURL;
|
||||
import net.sourceforge.plantuml.utils.StartUtils;
|
||||
|
||||
@ -86,7 +87,7 @@ public class StartDiagramExtractReader implements ReadLine {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
Log.error("Error " + e);
|
||||
}
|
||||
finished = true;
|
||||
|
@ -24,6 +24,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.brotli.BrotliInputStream;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
|
||||
public class Stdlib {
|
||||
@ -53,7 +54,7 @@ public class Stdlib {
|
||||
}
|
||||
return new ByteArrayInputStream(data.getBytes(UTF_8));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -31,7 +31,7 @@
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
* Modified by: Nicolas Jouanin
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.preproc2;
|
||||
@ -48,6 +48,7 @@ import net.sourceforge.plantuml.LineLocation;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineReader;
|
||||
import net.sourceforge.plantuml.preproc.ReadLineSimple;
|
||||
@ -111,7 +112,7 @@ public class PreprocessorUtils {
|
||||
}
|
||||
return ReadLineReader.create(new InputStreamReader(is), description);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return new ReadLineSimple(s, e.toString());
|
||||
}
|
||||
}
|
||||
@ -124,7 +125,7 @@ public class PreprocessorUtils {
|
||||
}
|
||||
return getReaderInclude(url, s.getLocation(), charset);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Cannot open URL " + e.getMessage());
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.project;
|
||||
@ -66,6 +66,7 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.InnerStrategy;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.UDrawable;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.project.core.Moment;
|
||||
import net.sourceforge.plantuml.project.core.MomentImpl;
|
||||
import net.sourceforge.plantuml.project.core.PrintScale;
|
||||
@ -247,7 +248,7 @@ public class GanttDiagram extends TitledDiagram implements ToTaskDraw, WithSprit
|
||||
timeHeader.drawTimeFooter(ug.apply(UTranslate.dy(totalHeightWithoutFooter)));
|
||||
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
final UDrawable crash = new GraphvizCrash(getSource().getPlainString(), false, t);
|
||||
crash.drawU(ug);
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.real;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
class PositiveForce {
|
||||
|
||||
private final Real fixedPoint;
|
||||
@ -68,10 +70,11 @@ class PositiveForce {
|
||||
try {
|
||||
fixedPointValue = fixedPoint.getCurrentValue();
|
||||
} catch (IllegalStateException e) {
|
||||
System.err.println("Pb with force " + this);
|
||||
System.err.println("This force has been created here:");
|
||||
creationPoint.printStackTrace();
|
||||
System.err.println("The fixed point has been created here: " + fixedPoint);
|
||||
Logger.error("Pb with force " + this);
|
||||
Logger.error("Pb with force " + this);
|
||||
Logger.error("This force has been created here:");
|
||||
Logger.error(creationPoint);
|
||||
Logger.error("The fixed point has been created here: " + fixedPoint);
|
||||
fixedPoint.printCreationStackTrace();
|
||||
throw e;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.real;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -93,7 +95,7 @@ class RealMax extends AbstractReal implements Real {
|
||||
}
|
||||
|
||||
public void printCreationStackTrace() {
|
||||
creationPoint.printStackTrace();
|
||||
Logger.error(creationPoint);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.real;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
abstract class RealMoveable extends AbstractReal implements Real {
|
||||
@ -54,7 +56,7 @@ abstract class RealMoveable extends AbstractReal implements Real {
|
||||
abstract void move(double delta);
|
||||
|
||||
final public void printCreationStackTrace() {
|
||||
creationPoint.printStackTrace();
|
||||
Logger.error(creationPoint);
|
||||
}
|
||||
|
||||
final public Real addFixed(double delta) {
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.salt;
|
||||
@ -63,6 +63,7 @@ import net.sourceforge.plantuml.core.ImageData;
|
||||
import net.sourceforge.plantuml.core.UmlSource;
|
||||
import net.sourceforge.plantuml.graphic.InnerStrategy;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.salt.element.Element;
|
||||
import net.sourceforge.plantuml.salt.factory.AbstractElementFactoryComplex;
|
||||
import net.sourceforge.plantuml.salt.factory.ElementFactory;
|
||||
@ -120,7 +121,7 @@ public class PSystemSalt extends TitledDiagram implements WithSprite {
|
||||
final Dimension2D size = salt.getPreferredDimension(stringBounder, 0, 0);
|
||||
return createImageBuilder(fileFormatOption).drawable(getTextBlock(salt, size)).write(os);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
UmlDiagram.exportDiagramError(os, e, fileFormatOption, seed(), getMetadata(), "none",
|
||||
new ArrayList<String>());
|
||||
return ImageDataSimple.error();
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.sdot;
|
||||
@ -88,6 +88,7 @@ import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
import net.sourceforge.plantuml.svek.Bibliotekon;
|
||||
@ -598,7 +599,7 @@ public class CucaDiagramFileMakerSmetana implements CucaDiagramFileMaker {
|
||||
}
|
||||
|
||||
static private List<String> getFailureText3(Throwable exception) {
|
||||
exception.printStackTrace();
|
||||
Logger.error(exception);
|
||||
final List<String> strings = new ArrayList<>();
|
||||
strings.add("An error has occured : " + exception);
|
||||
final String quote = StringUtils.rot(QuoteUtils.getSomeQuote());
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,11 +30,13 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.security;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
@ -219,7 +221,7 @@ public class SFile implements Comparable<SFile> {
|
||||
try {
|
||||
return internal.getCanonicalPath();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@ -348,7 +350,7 @@ public class SFile implements Comparable<SFile> {
|
||||
try {
|
||||
return SecurityUtils.readRasterImage(new ImageIcon(this.getAbsolutePath()));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -358,7 +360,7 @@ public class SFile implements Comparable<SFile> {
|
||||
try {
|
||||
return new BufferedReader(new FileReader(internal));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -373,7 +375,7 @@ public class SFile implements Comparable<SFile> {
|
||||
try {
|
||||
return new BufferedInputStream(new FileInputStream(internal));
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.security;
|
||||
@ -68,6 +68,7 @@ import javax.net.ssl.HttpsURLConnection;
|
||||
import javax.swing.ImageIcon;
|
||||
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAccessInterceptor;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAuthentication;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityCredentials;
|
||||
@ -83,11 +84,11 @@ import net.sourceforge.plantuml.security.authentication.SecurityCredentials;
|
||||
* host.
|
||||
* <p>
|
||||
* Example:<br/>
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* SURL url = SURL.create ("https://jenkins-access@jenkins.mycompany.com/api/json")
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* The {@code jenkins-access} will checked against the Security context access
|
||||
* token configuration. If a configuration exists for this token name, the token
|
||||
* will be removed from the URL and the credentials will be added to the
|
||||
@ -142,7 +143,7 @@ public class SURL {
|
||||
* <p>
|
||||
* The url must be http or https. Return null in case of error or if
|
||||
* <code>url</code> is null
|
||||
*
|
||||
*
|
||||
* @param url plain url starting by http:// or https//
|
||||
* @return the secure URL or null
|
||||
*/
|
||||
@ -154,7 +155,7 @@ public class SURL {
|
||||
try {
|
||||
return create(new URL(url));
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -163,7 +164,7 @@ public class SURL {
|
||||
* Create a secure URL from a <code>java.net.URL</code> object.
|
||||
* <p>
|
||||
* It takes into account credentials.
|
||||
*
|
||||
*
|
||||
* @param url
|
||||
* @return the secure URL
|
||||
* @throws MalformedURLException if <code>url</code> is null
|
||||
@ -399,7 +400,7 @@ public class SURL {
|
||||
|
||||
/**
|
||||
* Creates a GET request and response handler
|
||||
*
|
||||
*
|
||||
* @param url URL to request
|
||||
* @param proxy proxy to apply
|
||||
* @param authentication the authentication to use
|
||||
@ -443,7 +444,7 @@ public class SURL {
|
||||
* content will be identified as form or JSON data. The charset encoding can be
|
||||
* set by header parameters or will be set to UTF-8. The method to some fancy
|
||||
* logic to simplify it for the user.
|
||||
*
|
||||
*
|
||||
* @param url URL to request via POST method
|
||||
* @param proxy proxy to apply
|
||||
* @param authentication the authentication to use
|
||||
@ -488,7 +489,7 @@ public class SURL {
|
||||
try {
|
||||
return Charset.forName(matcher.group(1));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
@ -519,7 +520,7 @@ public class SURL {
|
||||
|
||||
/**
|
||||
* Reads data in a byte[] array.
|
||||
*
|
||||
*
|
||||
* @param input input stream
|
||||
* @return byte data
|
||||
* @throws IOException if something went wrong
|
||||
@ -537,7 +538,7 @@ public class SURL {
|
||||
|
||||
/**
|
||||
* Sends a request content payload to an endpoint.
|
||||
*
|
||||
*
|
||||
* @param connection HTTP connection
|
||||
* @param data data as byte array
|
||||
* @throws IOException if something went wrong
|
||||
@ -568,7 +569,7 @@ public class SURL {
|
||||
final ImageIcon tmp = new ImageIcon(bytes);
|
||||
return SecurityUtils.readRasterImage(tmp);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -609,7 +610,7 @@ public class SURL {
|
||||
|
||||
/**
|
||||
* Set the headers for a URL connection
|
||||
*
|
||||
*
|
||||
* @param headers map Keys with values (can be String or list of String)
|
||||
*/
|
||||
private static void applyAdditionalHeaders(URLConnection http, Map<String, Object> headers) {
|
||||
@ -631,7 +632,7 @@ public class SURL {
|
||||
/**
|
||||
* Removes the userInfo part from the URL, because we want to use the
|
||||
* SecurityCredentials instead.
|
||||
*
|
||||
*
|
||||
* @param url URL with UserInfo part
|
||||
* @return url without UserInfo part
|
||||
* @throws MalformedURLException
|
||||
@ -643,7 +644,7 @@ public class SURL {
|
||||
/**
|
||||
* Removes the userInfo part from the URL, because we want to use the
|
||||
* SecurityCredentials instead.
|
||||
*
|
||||
*
|
||||
* @param url URL with UserInfo part
|
||||
* @return url without UserInfo part
|
||||
*/
|
||||
|
@ -61,6 +61,7 @@ import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.StringUtils;
|
||||
import net.sourceforge.plantuml.json.Json;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAccessInterceptor;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAuthentication;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAuthorizeManager;
|
||||
@ -96,7 +97,7 @@ public class SecurityUtils {
|
||||
* Whitelist of paths from where scripts can load data.
|
||||
*/
|
||||
public static final String ALLOWLIST_LOCAL_PATHS = "plantuml.allowlist.path";
|
||||
|
||||
|
||||
/**
|
||||
* Whitelist of urls
|
||||
*/
|
||||
@ -426,7 +427,7 @@ public class SecurityUtils {
|
||||
try (Reader r = new BufferedReader(new FileReader(jsonFile))) {
|
||||
return Json.parse(r);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
return Json.object();
|
||||
|
@ -38,6 +38,7 @@ package net.sourceforge.plantuml.security.authentication.oauth;
|
||||
import net.sourceforge.plantuml.json.Json;
|
||||
import net.sourceforge.plantuml.json.JsonObject;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SURL;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAuthentication;
|
||||
import net.sourceforge.plantuml.security.authentication.SecurityAuthorizeManager;
|
||||
@ -133,7 +134,7 @@ public abstract class AbstractOAuth2AccessAuthorizeManager implements SecurityAu
|
||||
try {
|
||||
return URLEncoder.encode(data, "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -64,6 +64,7 @@ import net.sourceforge.plantuml.cucadiagram.Display;
|
||||
import net.sourceforge.plantuml.cucadiagram.EntityPortion;
|
||||
import net.sourceforge.plantuml.cucadiagram.Stereotype;
|
||||
import net.sourceforge.plantuml.graphic.SymbolContext;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.sequencediagram.graphic.FileMaker;
|
||||
import net.sourceforge.plantuml.sequencediagram.graphic.SequenceDiagramFileMakerPuma2;
|
||||
import net.sourceforge.plantuml.sequencediagram.graphic.SequenceDiagramTxtMaker;
|
||||
@ -444,7 +445,7 @@ public class SequenceDiagram extends UmlDiagram {
|
||||
// The DEBUG StringBounder is ok just to compute the number of pages here.
|
||||
return getSequenceDiagramPngMaker(1, new FileFormatOption(FileFormat.DEBUG)).getNbPages();
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
Logger.error(t);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.sprite;
|
||||
@ -48,6 +48,7 @@ import java.util.TreeSet;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
@ -63,7 +64,7 @@ public class RessourcesUtils {
|
||||
try {
|
||||
return listEntry(new SFile(local.toURI()));
|
||||
} catch (URISyntaxException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.sprite;
|
||||
@ -50,6 +50,7 @@ import net.sourceforge.plantuml.code.CompressionZopfliZlib;
|
||||
import net.sourceforge.plantuml.code.NoPlantumlCompressionException;
|
||||
import net.sourceforge.plantuml.code.PairInt;
|
||||
import net.sourceforge.plantuml.code.SpiralOnRectangle;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.ugraphic.color.ColorChangerMonochrome;
|
||||
|
||||
public enum SpriteGrayLevel {
|
||||
@ -296,7 +297,7 @@ public enum SpriteGrayLevel {
|
||||
}
|
||||
return result;
|
||||
} catch (NoPlantumlCompressionException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.sprite;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.awt.geom.Dimension2D;
|
||||
import net.sourceforge.plantuml.graphic.AbstractTextBlock;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.ugraphic.AffineTransformType;
|
||||
import net.sourceforge.plantuml.ugraphic.PixelImage;
|
||||
@ -91,7 +92,7 @@ public class SpriteImage implements Sprite {
|
||||
try {
|
||||
return new SpriteImage(SImageIO.read(is));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -60,6 +60,7 @@ import net.sourceforge.plantuml.graphic.HorizontalAlignment;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.graphic.TextBlock;
|
||||
import net.sourceforge.plantuml.graphic.TextBlockUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Stdlib;
|
||||
import net.sourceforge.plantuml.ugraphic.ImageBuilder;
|
||||
import net.sourceforge.plantuml.ugraphic.UFont;
|
||||
@ -101,7 +102,7 @@ public class StdlibDiagram extends UmlDiagram {
|
||||
try {
|
||||
drawInternal(ug);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,7 +134,7 @@ public class StdlibDiagram extends UmlDiagram {
|
||||
try {
|
||||
cmd.execute(this, bloc);
|
||||
} catch (NoSuchColorException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
// System.err.println("nb=" + nb);
|
||||
nb++;
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -44,6 +44,7 @@ import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.api.NumberAnalyzed;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.stats.api.StatsColumn;
|
||||
import net.sourceforge.plantuml.stats.api.StatsLine;
|
||||
import net.sourceforge.plantuml.stats.api.StatsTable;
|
||||
@ -100,7 +101,7 @@ public class FormatCounter {
|
||||
data.put(format, value);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -42,6 +42,7 @@ import java.util.List;
|
||||
import java.util.prefs.BackingStoreException;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.version.Version;
|
||||
|
||||
public class HistoricalData {
|
||||
@ -55,7 +56,7 @@ public class HistoricalData {
|
||||
try {
|
||||
historical.addAll(reload());
|
||||
} catch (BackingStoreException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
Collections.sort(historical, getIdComparator());
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -44,7 +44,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.logging.Filter;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.prefs.BackingStoreException;
|
||||
import java.util.prefs.Preferences;
|
||||
|
||||
@ -52,6 +51,7 @@ import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.transform.TransformerException;
|
||||
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.security.SecurityUtils;
|
||||
import net.sourceforge.plantuml.stats.api.Stats;
|
||||
@ -84,7 +84,7 @@ public class StatsUtils {
|
||||
static {
|
||||
try {
|
||||
// Logger.getLogger("java.util.prefs").setLevel(Level.OFF);
|
||||
Logger.getLogger("java.util.prefs").setFilter(new Filter() {
|
||||
java.util.logging.Logger.getLogger("java.util.prefs").setFilter(new Filter() {
|
||||
public boolean isLoggable(LogRecord record) {
|
||||
final String message = record.getMessage();
|
||||
System.err.println("SPECIAL TRACE FOR PLANTUML: " + message);
|
||||
@ -92,13 +92,13 @@ public class StatsUtils {
|
||||
}
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
if (prefs.getInt("VERSION", 0) != VERSION) {
|
||||
try {
|
||||
prefs.clear();
|
||||
} catch (BackingStoreException e1) {
|
||||
e1.printStackTrace();
|
||||
Logger.error(e1);
|
||||
}
|
||||
prefs.putInt("VERSION", VERSION);
|
||||
}
|
||||
@ -154,7 +154,7 @@ public class StatsUtils {
|
||||
htmlOutput(stats);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -46,6 +46,7 @@ import net.sourceforge.plantuml.core.Diagram;
|
||||
import net.sourceforge.plantuml.directdot.PSystemDot;
|
||||
import net.sourceforge.plantuml.eggs.PSystemWelcome;
|
||||
import net.sourceforge.plantuml.error.PSystemErrorUtils;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.math.PSystemMath;
|
||||
import net.sourceforge.plantuml.salt.PSystemSalt;
|
||||
import net.sourceforge.plantuml.stats.api.Stats;
|
||||
@ -174,7 +175,7 @@ public class StatsUtilsIncrement {
|
||||
lockHtml.unlock();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -72,7 +72,7 @@ public class CommandStyleMultilinesCSS extends CommandMultilines2<TitledDiagram>
|
||||
((SkinParam) diagram.getSkinParam()).applyPendingStyleMigration();
|
||||
return CommandExecutionResult.ok();
|
||||
} catch (NoStyleAvailableException e) {
|
||||
// e.printStackTrace();
|
||||
// Logger.error(e);
|
||||
return CommandExecutionResult.error("General failure: no style available.");
|
||||
}
|
||||
}
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.svek;
|
||||
@ -52,6 +52,7 @@ import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramSimplifierActivity;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.CucaDiagramSimplifierState;
|
||||
import net.sourceforge.plantuml.cucadiagram.dot.DotData;
|
||||
import net.sourceforge.plantuml.graphic.StringBounder;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
|
||||
|
||||
@ -66,7 +67,7 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
|
||||
try {
|
||||
return createFileInternal(os, dotStrings, fileFormatOption);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
@ -114,7 +115,7 @@ public final class CucaDiagramFileMakerSvek implements CucaDiagramFileMaker {
|
||||
if (widthwarning != null && widthwarning.matches("\\d+")) {
|
||||
warningOrError = svek2.getWarningOrError(Integer.parseInt(widthwarning));
|
||||
}
|
||||
|
||||
|
||||
// Sorry about this hack. There is a side effect in SvekResult::calculateDimension()
|
||||
result.calculateDimension(stringBounder); // Ensure text near the margins is not cut off
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@
|
||||
* Original Author: Arnaud Roques
|
||||
* Contribution : Hisashi Miyashita
|
||||
* Contribution : Serge Wenger
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.svek;
|
||||
@ -98,6 +98,7 @@ import net.sourceforge.plantuml.graphic.USymbol;
|
||||
import net.sourceforge.plantuml.graphic.USymbolHexagon;
|
||||
import net.sourceforge.plantuml.graphic.USymbolInterface;
|
||||
import net.sourceforge.plantuml.graphic.USymbols;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.style.PName;
|
||||
import net.sourceforge.plantuml.style.SName;
|
||||
import net.sourceforge.plantuml.style.Style;
|
||||
@ -437,7 +438,7 @@ public final class GeneralImageBuilder {
|
||||
}
|
||||
}
|
||||
} catch (IllegalStateException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@ import javax.xml.transform.TransformerException;
|
||||
import javax.xml.transform.dom.DOMSource;
|
||||
import javax.xml.transform.stream.StreamResult;
|
||||
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
import org.w3c.dom.CDATASection;
|
||||
import org.w3c.dom.Comment;
|
||||
import org.w3c.dom.Document;
|
||||
@ -178,7 +180,7 @@ public class SvgGraphics {
|
||||
defs.appendChild(script);
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
@ -238,7 +240,7 @@ public class SvgGraphics {
|
||||
final InputStream is = SvgGraphics.class.getResourceAsStream("/svg/" + name);
|
||||
return FileUtils.readText(is);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -896,7 +898,7 @@ public class SvgGraphics {
|
||||
|
||||
private final Map<String, String> images = new HashMap<String, String>();
|
||||
|
||||
|
||||
|
||||
private void svgImageUnsecure(UImageSvg image, double x, double y) {
|
||||
if (hidden == false) {
|
||||
String svg = manageScale(image);
|
||||
|
@ -5,9 +5,9 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
@ -71,6 +71,7 @@ import javax.swing.WindowConstants;
|
||||
import net.sourceforge.plantuml.GeneratedImage;
|
||||
import net.sourceforge.plantuml.ImageSelection;
|
||||
import net.sourceforge.plantuml.graphic.GraphicStrings;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.security.SImageIO;
|
||||
import net.sourceforge.plantuml.security.SFile;
|
||||
import net.sourceforge.plantuml.svek.TextBlockBackcolored;
|
||||
@ -337,7 +338,7 @@ class ImageWindow extends JFrame {
|
||||
final byte[] bytes = plainPngBuilder(error).writeByteArray();
|
||||
image = SImageIO.read(bytes);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
final ImageIcon imageIcon = new ImageIcon(image, simpleLine.toString());
|
||||
@ -393,7 +394,7 @@ class ImageWindow extends JFrame {
|
||||
final ImageSelection imgSel = new ImageSelection(image);
|
||||
Toolkit.getDefaultToolkit().getSystemClipboard().setContents(imgSel, null);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.swing;
|
||||
@ -83,6 +83,7 @@ import net.sourceforge.plantuml.DirWatcher2;
|
||||
import net.sourceforge.plantuml.GeneratedImage;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.Option;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.version.PSystemVersion;
|
||||
|
||||
public class MainWindow extends JFrame {
|
||||
@ -337,12 +338,8 @@ public class MainWindow extends JFrame {
|
||||
jList1.setListData(new Vector<>(currentDirectoryListing2));
|
||||
jList1.setVisible(true);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ExecutionException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException | InterruptedException | ExecutionException e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,12 +5,12 @@
|
||||
* (C) Copyright 2009-2023, Arnaud Roques
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
*
|
||||
* This file is part of PlantUML.
|
||||
*
|
||||
* PlantUML is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*
|
||||
* Original Author: Arnaud Roques
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package net.sourceforge.plantuml.telnet;
|
||||
@ -45,6 +45,7 @@ import net.sourceforge.plantuml.FileFormat;
|
||||
import net.sourceforge.plantuml.FileFormatOption;
|
||||
import net.sourceforge.plantuml.Log;
|
||||
import net.sourceforge.plantuml.SourceStringReader;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
|
||||
class AcceptTelnetClient extends Thread {
|
||||
final private Socket clientSocket;
|
||||
@ -85,7 +86,7 @@ class AcceptTelnetClient extends Thread {
|
||||
os.close();
|
||||
br.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,6 +43,7 @@ import java.io.UnsupportedEncodingException;
|
||||
|
||||
import net.sourceforge.plantuml.AFile;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.ImportedFiles;
|
||||
import net.sourceforge.plantuml.preproc.ReadLine;
|
||||
@ -96,7 +97,7 @@ public class EaterTheme extends Eater {
|
||||
return ReadLineReader.create(br, "theme " + realName);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
throw EaterException.located("Cannot load " + realName);
|
||||
|
||||
@ -108,7 +109,7 @@ public class EaterTheme extends Eater {
|
||||
try {
|
||||
return PreprocessorUtils.getReaderInclude(url, getLineLocation(), UTF_8);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Cannot decode charset");
|
||||
}
|
||||
}
|
||||
@ -121,7 +122,7 @@ public class EaterTheme extends Eater {
|
||||
|
||||
return ReadLineReader.create(tmp, "theme " + realName);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Cannot load " + realName);
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.command.CommandExecutionResult;
|
||||
import net.sourceforge.plantuml.json.Json;
|
||||
import net.sourceforge.plantuml.json.JsonValue;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.ImportedFiles;
|
||||
@ -300,7 +301,7 @@ public class TContext {
|
||||
throw (EaterException) e;
|
||||
if (e instanceof EaterExceptionLocated)
|
||||
throw (EaterExceptionLocated) e;
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Fatal parsing error");
|
||||
}
|
||||
}
|
||||
@ -501,7 +502,7 @@ public class TContext {
|
||||
return;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Cannot import " + e.getMessage());
|
||||
}
|
||||
|
||||
@ -549,7 +550,7 @@ public class TContext {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("cannot include " + location);
|
||||
}
|
||||
}
|
||||
@ -585,13 +586,13 @@ public class TContext {
|
||||
body.add(sl);
|
||||
} while (true);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("" + e);
|
||||
} finally {
|
||||
try {
|
||||
reader2.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -614,13 +615,13 @@ public class TContext {
|
||||
body.add(sl);
|
||||
} while (true);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("Error reading theme " + e);
|
||||
} finally {
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -691,14 +692,14 @@ public class TContext {
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
throw EaterException.located("cannot include " + e);
|
||||
} finally {
|
||||
if (reader != null) {
|
||||
try {
|
||||
reader.close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ import java.util.Set;
|
||||
|
||||
import net.sourceforge.plantuml.DefinitionsContainer;
|
||||
import net.sourceforge.plantuml.StringLocated;
|
||||
import net.sourceforge.plantuml.log.Logger;
|
||||
import net.sourceforge.plantuml.preproc.Defines;
|
||||
import net.sourceforge.plantuml.preproc.FileWithSuffix;
|
||||
import net.sourceforge.plantuml.preproc.ImportedFiles;
|
||||
@ -57,7 +58,7 @@ public class TimLoader {
|
||||
try {
|
||||
defines.copyTo(global);
|
||||
} catch (EaterException e) {
|
||||
e.printStackTrace();
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user