Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
SMASCH
scheduling-system
Commits
4bf36d67
Commit
4bf36d67
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
error reporting improved when color parsing fails
parent
bc5329f6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
Appointments dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
appointment-import/src/main/java/smash/appointment/parse/PrcSubjectsParser.java
+19
-14
19 additions, 14 deletions
.../main/java/smash/appointment/parse/PrcSubjectsParser.java
with
19 additions
and
14 deletions
appointment-import/src/main/java/smash/appointment/parse/PrcSubjectsParser.java
+
19
−
14
View file @
4bf36d67
...
...
@@ -56,7 +56,7 @@ public class PrcSubjectsParser extends SubjectParser {
@Override
protected
String
parseAddDate
(
Row
row
)
{
return
getDate
(
row
.
getCell
(
14
),
Calendar
.
getInstance
());
return
getDate
(
row
.
getCell
(
14
),
Calendar
.
getInstance
());
}
@Override
...
...
@@ -154,19 +154,24 @@ public class PrcSubjectsParser extends SubjectParser {
@Override
protected
boolean
parseResigned
(
Row
row
)
{
IndexedColors
color
=
IndexedColors
.
fromInt
(
row
.
getSheet
().
getWorkbook
().
getFontAt
(
row
.
getCell
(
0
).
getCellStyle
().
getFontIndex
()).
getColor
());
switch
(
color
)
{
case
RED:
return
true
;
case
BLUE:
return
false
;
case
BLACK:
return
false
;
case
GREEN:
return
false
;
default
:
logger
.
debug
(
"Unknown font color: "
+
color
);
return
false
;
try
{
IndexedColors
color
=
IndexedColors
.
fromInt
(
row
.
getSheet
().
getWorkbook
().
getFontAt
(
row
.
getCell
(
0
).
getCellStyle
().
getFontIndex
()).
getColor
());
switch
(
color
)
{
case
RED:
return
true
;
case
BLUE:
return
false
;
case
BLACK:
return
false
;
case
GREEN:
return
false
;
default
:
logger
.
debug
(
"Unknown font color: "
+
color
);
return
false
;
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"Problem with parsing color for subject: "
+
this
.
toString
(),
e
);
return
false
;
}
}
}
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