Commit 5e1a805
authored
fix(spring): correctly parse and handle mirror node endpoint protocol (#111)
This PR addresses a bug in HieroAutoConfiguration.java where the default
port for the Mirror Node was being incorrectly assigned due to identity
comparison (==) on the protocol string.
- Replaced identity comparison with .equalsIgnoreCase() for robust protocol detection.
- Refactored port defaulting logic to explicitly handle http (80) and https (443).
- Implemented a fail-fast mechanism that throws an IllegalArgumentException for unsupported protocols.
- Removed redundant url.getPort() == -1 checks.
Signed-off-by: Aamir377300 <belalaamirkhan@gmail.com>1 parent e1737ed commit 5e1a805
1 file changed
Lines changed: 8 additions & 6 deletions
File tree
- hiero-enterprise-spring/src/main/java/org/hiero/spring/implementation
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
0 commit comments