mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-21 12:35:10 +00:00
Merge pull request #1724 from travkin79/patch/fix-NPE
Avoid NPE when a remote input stream cannot be read (while reading a remote style file)
This commit is contained in:
commit
06d06e729b
@ -86,7 +86,9 @@ public class CommandStyleImport extends SingleLineCommand2<TitledDiagram> {
|
||||
if (path.startsWith("http://") || path.startsWith("https://")) {
|
||||
SURL url = SURL.create(path);
|
||||
try (InputStream remoteInputStream = url.openStream()) {
|
||||
lines = BlocLines.load(remoteInputStream, location);
|
||||
if (remoteInputStream != null) {
|
||||
lines = BlocLines.load(remoteInputStream, location);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
final SFile styleFile = FileSystem.getInstance().getFile(path);
|
||||
|
Loading…
Reference in New Issue
Block a user