Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
poc-api
Project
Project
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
poc
poc-api
Commits
9c34cbfd
Commit
9c34cbfd
authored
Oct 25, 2024
by
jennie chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改空指针异常
parent
b8fab54e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
AgentApplicationInfoConvert.java
...gent_application/convert/AgentApplicationInfoConvert.java
+12
-10
No files found.
src/main/java/cn/com/poc/agent_application/convert/AgentApplicationInfoConvert.java
View file @
9c34cbfd
...
@@ -137,16 +137,18 @@ public class AgentApplicationInfoConvert {
...
@@ -137,16 +137,18 @@ public class AgentApplicationInfoConvert {
commConfig
.
setContinuousQuestionTurn
(
entity
.
getContinuousQuestionTurn
());
commConfig
.
setContinuousQuestionTurn
(
entity
.
getContinuousQuestionTurn
());
List
<
Variable
>
variables
=
new
ArrayList
<>();
List
<
Variable
>
variables
=
new
ArrayList
<>();
String
[]
variableStructure
=
entity
.
getVariableStructure
();
String
[]
variableStructure
=
entity
.
getVariableStructure
();
for
(
int
i
=
0
;
i
<
variableStructure
.
length
;
i
++)
{
if
(
variableStructure
!=
null
){
Variable
variable
=
new
Variable
();
for
(
int
i
=
0
;
i
<
variableStructure
.
length
;
i
++)
{
String
input
=
variableStructure
[
i
];
Variable
variable
=
new
Variable
();
// 定义正则表达式模式
String
input
=
variableStructure
[
i
];
Pattern
pattern
=
Pattern
.
compile
(
"(key|default):([^,]+)"
);
// 定义正则表达式模式
Matcher
matcher
=
pattern
.
matcher
(
input
);
Pattern
pattern
=
Pattern
.
compile
(
"(key|default):([^,]+)"
);
if
(
matcher
.
find
())
{
Matcher
matcher
=
pattern
.
matcher
(
input
);
variable
.
setKey
(
matcher
.
group
(
1
));
if
(
matcher
.
find
())
{
variable
.
setVariableDefault
(
matcher
.
group
(
2
));
variable
.
setKey
(
matcher
.
group
(
1
));
variables
.
add
(
variable
);
variable
.
setVariableDefault
(
matcher
.
group
(
2
));
variables
.
add
(
variable
);
}
}
}
}
}
commConfig
.
setVariableStructure
(
variables
);
commConfig
.
setVariableStructure
(
variables
);
...
...
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