Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ac
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
OATS-CADC
ac
Commits
d0f841ed
Commit
d0f841ed
authored
9 years ago
by
Alinga Yeung
Browse files
Options
Downloads
Patches
Plain Diff
Story 1840. Simplified code.
parent
83def454
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/cadcAccessControl-Admin/src/ca/nrc/cadc/ac/admin/CmdLineParser.java
+7
-6
7 additions, 6 deletions
...Control-Admin/src/ca/nrc/cadc/ac/admin/CmdLineParser.java
with
7 additions
and
6 deletions
projects/cadcAccessControl-Admin/src/ca/nrc/cadc/ac/admin/CmdLineParser.java
+
7
−
6
View file @
d0f841ed
...
...
@@ -200,8 +200,7 @@ public class CmdLineParser
}
}
protected
boolean
isValid
(
final
ArgumentMap
am
,
final
PrintStream
outStream
,
final
PrintStream
errStream
)
throws
UsageException
protected
boolean
isValid
(
final
ArgumentMap
am
)
throws
UsageException
{
int
count
=
0
;
...
...
@@ -253,8 +252,6 @@ public class CmdLineParser
if
(
count
==
1
)
{
this
.
command
.
setSystemOut
(
outStream
);
this
.
command
.
setSystemErr
(
errStream
);
return
true
;
}
else
...
...
@@ -285,7 +282,7 @@ public class CmdLineParser
{
this
.
proceed
=
false
;
if
(!
am
.
isSet
(
"h"
)
&&
!
am
.
isSet
(
"help"
)
&&
isValid
(
am
,
out
,
err
))
if
(!
am
.
isSet
(
"h"
)
&&
!
am
.
isSet
(
"help"
)
&&
isValid
(
am
))
{
Subject
subject
=
CertCmdArgUtil
.
initSubject
(
am
,
true
);
...
...
@@ -300,13 +297,17 @@ public class CmdLineParser
if
(
am
.
isSet
(
"list"
))
{
// we can use anonymous subject
this
.
proceed
=
true
;
this
.
proceed
=
true
;
}
else
{
throw
e
;
}
}
// the following statements are executed only when proceed is true
this
.
command
.
setSystemOut
(
out
);
this
.
command
.
setSystemErr
(
err
);
}
}
...
...
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