Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Log
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rohith Kumar Shanmuganathan
Log
Commits
606e441b
There was an error fetching the commit references. Please try again later.
Commit
606e441b
authored
Oct 18, 2023
by
Rohith Kumar Shanmuganathan
Browse files
Options
Downloads
Patches
Plain Diff
Update LogRead.java
parent
8c6970d9
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/l_read/LogRead.java
+9
-9
9 additions, 9 deletions
code/l_read/LogRead.java
with
9 additions
and
9 deletions
code/l_read/LogRead.java
+
9
−
9
View file @
606e441b
...
...
@@ -26,15 +26,15 @@ class LogRead {
execute
(
cmd
);
}
catch
(
Throwable
e
)
{
if
(
e
.
getMessage
()
!=
null
&&
e
.
getMessage
().
equals
(
"integrity violation"
))
{
System
.
out
.
print
ln
(
e
.
getMessage
());
System
.
out
.
print
(
e
.
getMessage
());
}
else
{
System
.
out
.
print
ln
(
"invalid"
);
System
.
out
.
print
(
"invalid"
);
}
System
.
exit
(
255
);
}
System
.
exit
(
0
);
// 255 for error, 0 success
}
System
.
out
.
print
ln
(
"invalid"
);
System
.
out
.
print
(
"invalid"
);
System
.
exit
(
255
);
}
...
...
@@ -113,7 +113,7 @@ class LogRead {
for
(
String
p
:
employees
)
{
res
.
append
(
p
).
append
(
","
);
}
System
.
out
.
print
ln
(
res
.
substring
(
0
,
res
.
length
()
-
1
));
System
.
out
.
print
(
res
.
substring
(
0
,
res
.
length
()
-
1
));
}
// Prints all guests found in the gallery
if
(
guests
.
size
()
>
0
)
{
...
...
@@ -122,7 +122,7 @@ class LogRead {
for
(
String
p
:
guests
)
{
res
.
append
(
p
).
append
(
","
);
}
System
.
out
.
print
ln
(
res
.
substring
(
0
,
res
.
length
()
-
1
));
System
.
out
.
print
(
res
.
substring
(
0
,
res
.
length
()
-
1
));
}
//Sorts the rooms the guests are in and prints them to the console
...
...
@@ -136,7 +136,7 @@ class LogRead {
names
.
append
(
p
.
getName
()).
append
(
","
);
}
names
=
new
StringBuilder
(
names
.
substring
(
0
,
names
.
length
()
-
1
));
System
.
out
.
print
ln
(
sortedRoomNumbers
.
get
(
i
)
+
": "
+
names
);
System
.
out
.
print
(
sortedRoomNumbers
.
get
(
i
)
+
": "
+
names
);
}
}
...
...
@@ -168,7 +168,7 @@ class LogRead {
}
if
(
visitedRooms
.
size
()
>
0
)
{
System
.
out
.
print
ln
(
data
.
substring
(
0
,
data
.
length
()
-
1
));
System
.
out
.
print
(
data
.
substring
(
0
,
data
.
length
()
-
1
));
}
}
...
...
@@ -217,7 +217,7 @@ class LogRead {
}
}
System
.
out
.
print
ln
(
finalValue
);
System
.
out
.
print
(
finalValue
);
}
/**
...
...
@@ -280,7 +280,7 @@ class LogRead {
for
(
Integer
room
:
result
)
{
data
.
append
(
room
).
append
(
","
);
}
System
.
out
.
print
ln
(
data
.
substring
(
0
,
data
.
length
()
-
1
));
System
.
out
.
print
(
data
.
substring
(
0
,
data
.
length
()
-
1
));
}
/**
...
...
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