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
c6d695c1
Commit
c6d695c1
authored
8 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
small NPE fixed when accessing data from excel
parent
ab6b12b3
No related branches found
No related tags found
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/XlsxCalendarProcessor.java
+10
-7
10 additions, 7 deletions
...n/java/smash/appointment/parse/XlsxCalendarProcessor.java
with
10 additions
and
7 deletions
appointment-import/src/main/java/smash/appointment/parse/XlsxCalendarProcessor.java
+
10
−
7
View file @
c6d695c1
...
@@ -62,7 +62,7 @@ public class XlsxCalendarProcessor {
...
@@ -62,7 +62,7 @@ public class XlsxCalendarProcessor {
CellParser
parser
=
new
CellParser
();
CellParser
parser
=
new
CellParser
();
parser
.
setSubjectDao
(
subjectDao
);
parser
.
setSubjectDao
(
subjectDao
);
for
(
int
weekOffset
:
weekStartRows
)
{
for
(
int
weekOffset
:
weekStartRows
)
{
Row
weekRow
=
sheet
.
getRow
(
weekOffset
+
dayOfMonthRowOffset
);
Row
weekRow
=
sheet
.
getRow
(
weekOffset
+
dayOfMonthRowOffset
);
for
(
int
dayColumnOffset
:
dayColumns
)
{
for
(
int
dayColumnOffset
:
dayColumns
)
{
...
@@ -89,13 +89,16 @@ public class XlsxCalendarProcessor {
...
@@ -89,13 +89,16 @@ public class XlsxCalendarProcessor {
}
}
}
}
String
query
=
hourRow
.
getCell
(
dayColumnOffset
).
getStringCellValue
();
Cell
queryCell
=
hourRow
.
getCell
(
dayColumnOffset
);
if
(
queryCell
!=
null
)
{
String
query
=
queryCell
.
getStringCellValue
();
if
(
query
!=
null
&&
!
query
.
isEmpty
())
{
AppointmentEntry
entry
=
parser
.
parseAppointment
(
query
,
hour
);
entry
.
setDay
(
day
);
if
(
query
!=
null
&&
!
query
.
isEmpty
())
{
result
.
add
(
entry
);
AppointmentEntry
entry
=
parser
.
parseAppointment
(
query
,
hour
);
}
entry
.
setDay
(
day
);
result
.
add
(
entry
);
}
}
}
}
}
}
...
...
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