Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
8f0a300c
Commit
8f0a300c
authored
Mar 29, 2016
by
lepdou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change argument check exception
parent
fc369a00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
ConfigController.java
.../com/ctrip/apollo/portal/controller/ConfigController.java
+2
-1
VersionController.java
...com/ctrip/apollo/portal/controller/VersionController.java
+3
-2
No files found.
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/ConfigController.java
View file @
8f0a300c
...
@@ -25,7 +25,8 @@ public class ConfigController {
...
@@ -25,7 +25,8 @@ public class ConfigController {
@PathVariable
long
versionId
)
{
@PathVariable
long
versionId
)
{
if
(
Strings
.
isNullOrEmpty
(
appId
)
||
Strings
.
isNullOrEmpty
(
env
))
{
if
(
Strings
.
isNullOrEmpty
(
appId
)
||
Strings
.
isNullOrEmpty
(
env
))
{
throw
new
NotFoundException
();
throw
new
IllegalArgumentException
(
String
.
format
(
"app id and env can not be empty. app id:%s , env:%s"
,
appId
,
env
));
}
}
Apollo
.
Env
e
=
Apollo
.
Env
.
valueOf
(
env
);
Apollo
.
Env
e
=
Apollo
.
Env
.
valueOf
(
env
);
...
...
apollo-portal/src/main/java/com/ctrip/apollo/portal/controller/VersionController.java
View file @
8f0a300c
...
@@ -24,8 +24,9 @@ public class VersionController {
...
@@ -24,8 +24,9 @@ public class VersionController {
@RequestMapping
(
"/{appId}/{env}"
)
@RequestMapping
(
"/{appId}/{env}"
)
public
List
<
VersionDTO
>
versions
(
@PathVariable
String
appId
,
@PathVariable
String
env
)
{
public
List
<
VersionDTO
>
versions
(
@PathVariable
String
appId
,
@PathVariable
String
env
)
{
if
(
Strings
.
isNullOrEmpty
(
appId
)
||
Strings
.
isNullOrEmpty
(
env
)){
if
(
Strings
.
isNullOrEmpty
(
appId
)
||
Strings
.
isNullOrEmpty
(
env
))
{
return
Collections
.
EMPTY_LIST
;
throw
new
IllegalArgumentException
(
String
.
format
(
"app id and env can not be empty. app id:%s , env:%s"
,
appId
,
env
));
}
}
return
versionService
.
findVersionsByApp
(
Apollo
.
Env
.
valueOf
(
env
),
appId
);
return
versionService
.
findVersionsByApp
(
Apollo
.
Env
.
valueOf
(
env
),
appId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment