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
31399b0d
Commit
31399b0d
authored
3 months ago
by
Riegel
Browse files
Options
Download
Email Patches
Plain Diff
Feat!: Delete ErroneousEntry.java
parent
3563658f
master
dev
dev_cpp_code_conversion
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
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
+1
-2
...ava/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/ErroneousEntry.java
+0
-25
...java/de/hft/stuttgart/citydoctor2/zip/ErroneousEntry.java
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+1
-1
...c/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
with
2 additions
and
28 deletions
+2
-28
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/ArchivePacker.java
+
1
-
2
View file @
31399b0d
...
...
@@ -3,7 +3,6 @@ package de.hft.stuttgart.citydoctor2.utils;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipArchive
;
import
de.hft.stuttgart.citydoctor2.zip.CityGmlZipEntry
;
import
de.hft.stuttgart.citydoctor2.zip.ErroneousEntry
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -32,7 +31,7 @@ public class ArchivePacker {
tmpDir
=
Files
.
createTempDirectory
(
"zipTmp"
);
tmpDir
.
toFile
().
deleteOnExit
();
for
(
CityGmlZipEntry
entry
:
archive
.
getEntries
())
{
if
(
entry
instanceof
ErroneousEntry
){
if
(
entry
.
getErrorType
()
!=
null
){
continue
;
}
CityDoctorModel
model
=
entry
.
getModel
();
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/zip/ErroneousEntry.java
deleted
100644 → 0
+
0
-
25
View file @
3563658f
package
de.hft.stuttgart.citydoctor2.zip
;
import
de.hft.stuttgart.citydoctor2.datastructure.CityDoctorModel
;
import
java.util.zip.ZipEntry
;
public
class
ErroneousEntry
extends
CityGmlZipEntry
{
private
ZipEntryErrorType
errorType
=
null
;
public
ErroneousEntry
(
String
filename
,
ZipEntryErrorType
errorType
){
super
(
filename
,
true
);
this
.
errorType
=
errorType
;
}
@Override
public
CityDoctorModel
getModel
(){
return
null
;
}
public
ZipEntryErrorType
getErrorType
()
{
return
errorType
;
}
}
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/test/java/de/hft/stuttgart/citydoctor2/zip/ZipTest.java
+
1
-
1
View file @
31399b0d
...
...
@@ -34,7 +34,7 @@ public class ZipTest {
for
(
CityGmlZipEntry
entry
:
cgmlArch
.
getEntries
())
{
assertNotNull
(
entry
);
assertTrue
(
entry
.
getFileName
().
matches
(
"^mock[1-5].gml$"
));
assert
False
(
entry
instanceof
ErroneousEntry
);
assert
Null
(
entry
.
getErrorType
()
);
assertNotNull
(
entry
.
getModel
());
assertEquals
(
1
,
entry
.
getModel
().
getNumberOfFeatures
());
}
...
...
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