Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
b7304ed1
Commit
b7304ed1
authored
2 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Fix: Prevent crashing due to malformed zipEntry
parent
8ceef30a
master
dev
dev_gui_features_zip_loading
3.17.0
archive/dev_gui_features_zip_loading
2 merge requests
!28
Version 3.17.0 Release
,
!26
Add ZIP-archive support
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
+5
-0
...a/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
+10
-9
...e/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
with
15 additions
and
9 deletions
+15
-9
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/CityGmlZipArchive.java
+
5
-
0
View file @
b7304ed1
...
@@ -10,10 +10,12 @@ import java.io.FileInputStream;
...
@@ -10,10 +10,12 @@ import java.io.FileInputStream;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.Serial
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.nio.charset.MalformedInputException
;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipException
;
import
java.util.zip.ZipFile
;
import
java.util.zip.ZipFile
;
import
java.util.zip.ZipInputStream
;
import
java.util.zip.ZipInputStream
;
...
@@ -47,6 +49,9 @@ public class CityGmlZipArchive implements Serializable {
...
@@ -47,6 +49,9 @@ public class CityGmlZipArchive implements Serializable {
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
logger
.
error
(
"Encountered an IOError while registering CityGmlArchive"
,
e
);
logger
.
error
(
"Encountered an IOError while registering CityGmlArchive"
,
e
);
return
null
;
return
null
;
}
catch
(
Exception
e
)
{
logger
.
error
(
"Encountered an unexpected error while registering CityGmlArchive"
,
e
);
return
null
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/Extensions/CityDoctorGUI/src/main/java/de/hft/stuttgart/citydoctor2/gui/CityDoctorController.java
+
10
-
9
View file @
b7304ed1
...
@@ -154,15 +154,16 @@ public class CityDoctorController {
...
@@ -154,15 +154,16 @@ public class CityDoctorController {
currentConfig
=
new
ParserConfiguration
(
numberOfRoundingPlaces
,
useValidation
,
lowMemory
);
currentConfig
=
new
ParserConfiguration
(
numberOfRoundingPlaces
,
useValidation
,
lowMemory
);
zipArchive
=
CityGmlZipArchive
.
register
(
path
);
zipArchive
=
CityGmlZipArchive
.
register
(
path
);
if
(
zipArchive
!=
null
)
{
Platform
.
runLater
(()
->
{
Platform
.
runLater
(()
->
{
try
{
try
{
currentZipEntryManager
=
new
ZipEntryManager
(
mainWindow
.
getMainStage
(),
this
);
currentZipEntryManager
=
new
ZipEntryManager
(
mainWindow
.
getMainStage
(),
this
);
currentZipEntryManager
.
show
();
currentZipEntryManager
.
show
();
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
});
});
}
}
}
public
void
decompressZipEntry
(
CityGmlZipEntry
entry
,
ProgressListener
l
)
{
public
void
decompressZipEntry
(
CityGmlZipEntry
entry
,
ProgressListener
l
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets