Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
f9f9f06f
Commit
f9f9f06f
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-475: make the 8.2 upgrader more robust and the read method of the course too
parent
ba632cb5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/olat/course/PersistingCourseImpl.java
+7
-2
7 additions, 2 deletions
src/main/java/org/olat/course/PersistingCourseImpl.java
src/main/java/org/olat/upgrade/OLATUpgrade_8_2_0.java
+3
-1
3 additions, 1 deletion
src/main/java/org/olat/upgrade/OLATUpgrade_8_2_0.java
with
10 additions
and
3 deletions
src/main/java/org/olat/course/PersistingCourseImpl.java
+
7
−
2
View file @
f9f9f06f
...
...
@@ -425,8 +425,13 @@ public class PersistingCourseImpl implements ICourse, OLATResourceable, Serializ
if
(
vfsItem
==
null
||
!(
vfsItem
instanceof
VFSLeaf
))
{
throw
new
CorruptedCourseException
(
"Cannot resolve file: "
+
fileName
+
" course="
+
toString
());
}
XStream
xstream
=
CourseXStreamAliases
.
getReadCourseXStream
();
return
XStreamHelper
.
readObject
(
xstream
,
((
VFSLeaf
)
vfsItem
).
getInputStream
());
try
{
XStream
xstream
=
CourseXStreamAliases
.
getReadCourseXStream
();
return
XStreamHelper
.
readObject
(
xstream
,
((
VFSLeaf
)
vfsItem
).
getInputStream
());
}
catch
(
Exception
e
)
{
log
.
error
(
"Cannot read course tree file: "
+
fileName
);
throw
new
CorruptedCourseException
(
"Cannot resolve file: "
+
fileName
+
" course="
+
toString
(),
e
);
}
}
/**
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/olat/upgrade/OLATUpgrade_8_2_0.java
+
3
−
1
View file @
f9f9f06f
...
...
@@ -176,6 +176,8 @@ public class OLATUpgrade_8_2_0 extends OLATUpgrade {
course
.
postImport
(
envMapper
);
}
catch
(
CorruptedCourseException
e
)
{
log
.
error
(
"Course seems corrupt: "
+
entry
.
getOlatResource
().
getResourceableId
());
}
catch
(
Exception
e
)
{
log
.
error
(
"Course seems highly corrupt: "
+
entry
.
getOlatResource
().
getResourceableId
());
}
}
dbInstance
.
intermediateCommit
();
...
...
@@ -183,7 +185,7 @@ public class OLATUpgrade_8_2_0 extends OLATUpgrade {
log
.
audit
(
"Processed repository entries: "
+
entries
.
size
());
}
while
(
entries
.
size
()
==
REPO_ENTRIES_BATCH_SIZE
);
uhd
.
setBooleanDataValue
(
TASK_CONDITIONS
,
fals
e
);
uhd
.
setBooleanDataValue
(
TASK_CONDITIONS
,
tru
e
);
upgradeManager
.
setUpgradesHistory
(
uhd
,
VERSION
);
}
return
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment