-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42030 from HindujaB/http-fix
Fix NPE from daemon strand for record value creation
- Loading branch information
Showing
5 changed files
with
128 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
tests/jballerina-unit-test/src/test/resources/test-src/runtime/api/no_strand/Ballerina.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[package] | ||
org= "testorg" | ||
name="no_strand" | ||
version= "1.0.0" |
55 changes: 55 additions & 0 deletions
55
tests/jballerina-unit-test/src/test/resources/test-src/runtime/api/no_strand/main.bal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). | ||
// | ||
// WSO2 Inc. licenses this file to you under the Apache License, | ||
// Version 2.0 (the "License"); you may not use this file except | ||
// in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
import ballerina/lang.runtime; | ||
|
||
public class Listener { | ||
|
||
private string name = ""; | ||
|
||
public function init(string name){ | ||
self.name = name; | ||
} | ||
|
||
public function 'start() returns error? { | ||
} | ||
|
||
public function gracefulStop() returns error? { | ||
} | ||
|
||
public function immediateStop() returns error? { | ||
} | ||
|
||
public function attach(service object {} s, string[]|string? name = ()) returns error? { | ||
} | ||
|
||
public function detach(service object {} s) returns error? { | ||
} | ||
} | ||
|
||
public function main() { | ||
Listener l = new("TestListener"); | ||
runtime:registerListener(l); | ||
} | ||
|
||
public type MutualSslHandshake record {| | ||
MutualSslStatus status = PASSED; | ||
string? base64EncodedCert = (); | ||
|}; | ||
|
||
public type MutualSslStatus PASSED|FAILED|(); | ||
public const PASSED = "passed"; | ||
public const FAILED = "failed"; |