Commit 28eecf2
committed
Avoid compatibility check failure for Uber JARs and Universal Binaries
When packaging SWT into an Uber Jar or using universal binaries (for
multiple architectures), the Jar manifest cannot reference a single OS
and/or architecture. As a result, the compatibility check implemented in
Library.isLaodable() can never succeed for such a packaging. With those
compatibility checks always being executed upon initialization of SWT
with a recent change, using such packaging of SWT became difficult or
impossible.
This change makes the initialization of SWT not fail in case the JAR
manifest is completely lacking the according entries for OS and
architecture. This will still make the initialization fail if an OS
and/or architecture is specified in the manifest that is incompatible to
the current environment, but in case the manifest does not contain such
entries, the library will just (try to) boot. The behavior of
Platform.isLoadable() is preserved. That method will still return false
in case the Manifest does not contain according entries, as this is the
long-standing behavior of that method.
Fixes #29281 parent 588e560 commit 28eecf2
4 files changed
Lines changed: 14 additions & 12 deletions
File tree
- bundles/org.eclipse.swt/Eclipse SWT PI
- cocoa/org/eclipse/swt/internal
- common/org/eclipse/swt/internal
- gtk/org/eclipse/swt/internal
- win32/org/eclipse/swt/internal
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
Lines changed: 11 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
25 | 20 | | |
26 | 21 | | |
27 | 22 | | |
| |||
192 | 187 | | |
193 | 188 | | |
194 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
195 | 194 | | |
196 | 195 | | |
197 | 196 | | |
| |||
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments