Commit 1b245c1
committed
Don't use ObjectIndex when retrieving singletons
There was an inconsistency in that getInstances was using a private
list of singleton instances, but getInstance(Class) was trying to use
the ObjectIndex.
Unfortunately, the use of the ObjectIndex is currently bugged due to
its loading ALL instances when any single instance type is requested.
Thus we update the getInstance(Class) implementation to use a private
hash of available instances.
A proper ObjectIndex implementation will need to wait for 3.0.0.1 parent 15af383 commit 1b245c1
File tree
1 file changed
+15
-2
lines changed- src/main/java/org/scijava/plugin
1 file changed
+15
-2
lines changedLines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| 76 | + | |
72 | 77 | | |
73 | 78 | | |
74 | | - | |
75 | | - | |
| 79 | + | |
| 80 | + | |
76 | 81 | | |
77 | 82 | | |
78 | 83 | | |
| |||
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
101 | 114 | | |
102 | 115 | | |
103 | 116 | | |
| |||
0 commit comments