Commit 917d3b3
authored
Don't require quotes around
Fixes: #39
The `release` file contained within the
[Microsoft OpenJDK Distribution Preview][0] contains an entry which
broke the `release` parser within `JdkInfo`, an entry which doesn't
contain double quotes around the value:
BUILD_NUMBER=9
This causes an exception to be thrown when `JdkInfo` attempts to parse
the `release` file:
System.ArgumentOutOfRangeException : Length cannot be less than zero.
Parameter name: length
at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0004a] in <7e59c4ad7b424f9eab0db1b78ec1804f>:0
at Xamarin.Android.Tools.JdkInfo.GetReleaseProperties () [0x0006b] in <3975ab851981476abded14492926b261>:0
at Xamarin.Android.Tools.JdkInfo..ctor (System.String homePath) [0x00159] in <3975ab851981476abded14492926b261>:0
Update `JdkInfo.GetReleaseProperties()` so that the double-quotes
around values are *optional* and not required, so that this `release`
file may be processed without throwing an exception.
[0]: https://dl.xamarin.com/OpenJDK/mac/microsoft-dist-openjdk-1.8.0.9.ziprelease values (#41)1 parent 7427692 commit 917d3b3
File tree
2 files changed
+15
-6
lines changed- src/Xamarin.Android.Tools.AndroidSdk
- Tests
2 files changed
+15
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
150 | 151 | | |
151 | | - | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
159 | 166 | | |
160 | | - | |
161 | | - | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| |||
0 commit comments