Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
RagConnect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
JastAdd
RagConnect
Merge requests
!7
Resolve "Check input for URI format upon calling a connect method"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Check input for URI format upon calling a connect method"
22-check-input-for-uri-format-upon-calling-a-connect-method
into
dev
Overview
0
Commits
1
Pipelines
2
Changes
16
Merged
René Schöne
requested to merge
22-check-input-for-uri-format-upon-calling-a-connect-method
into
dev
4 years ago
Overview
0
Commits
1
Pipelines
2
Changes
16
Closes
#22 (closed)
Edited
4 years ago
by
René Schöne
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
81058872
1 commit,
4 years ago
16 files
+
198
−
157
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
16
ragconnect.base/src/main/resources/handleUri.mustache
+
13
−
1
View file @ 81058872
Edit in single-file editor
Open in Web IDE
Show full file
String scheme,host, path;
String scheme,
host, path;
java.net.URI uri;
java.net.URI uri;
try {
try {
uri = new java.net.URI(
{{
connectParameterName
}}
);
uri = new java.net.URI(
{{
connectParameterName
}}
);
@@ -9,3 +9,15 @@ try {
@@ -9,3 +9,15 @@ try {
System.err.println(e.getMessage()); // Maybe re-throw error?
System.err.println(e.getMessage()); // Maybe re-throw error?
return false;
return false;
}
}
if (scheme == null || scheme.isBlank()) {
System.err.println("Missing or empty scheme in " + uri);
return false;
}
if (host == null || host.isBlank()) {
System.err.println("Missing or empty host in " + uri);
return false;
}
if (path == null || path.isBlank()) {
System.err.println("Missing or empty path in " + uri);
return false;
}
Loading