I can think of one possibility of a deadlock with the patch, although it is very synthetic and I am not sure if this pattern could be turned into something sane:
@ApplicationScoped
public class KnitProducer
{
@Inject
Instance<PurlKnit> purlKnit;
@Inject
KnittingOrder knittingOrder;
@Produces
@ApplicationScoped
public KnitPurl getKnitPurl() {
if (knittingOrder.isKnitFirst()) {
Purl purl = purlKnit.get();
purl.toString();
returnnew KnitPurl(purl);
}
else {
returnnew KnitPurl(new Purl());
}
}
}
@ApplicationScoped
public class PurlProducer {
@Inject
Instance<KnitPurl> knitPurl;
@Inject
KnittingOrder knittingOrder;
@Produces
@ApplicationScoped
public PurlKnit getPurlKnit() {
if (!knittingOrder.isKnitFirst()) {
KnitPurl knit = knitPurl.get();
knit.toString();
returnnew PurlKnit(knit);
}
else {
returnnew PurlKnit(new Knit());
}
}
}
@RequestScoped
public class KnittingOrder
{
privateboolean knitFirst;
publicboolean isKnitFirst()
{
return knitFirst;
}
public void setKnitFirst(boolean knitFirst)
{
this.knitFirst = knitFirst;
}
}
@Typed({}) public class Purl ...
@Typed({}) public class PurlKnit extends Purl ...
@Typed({}) public class Knit ...
@Typed({}) public class KnitPurl extends Knit ...
(anyway, this case is infinitely less important than the original issue, so it should not block the patch)
I can think of one possibility of a deadlock with the patch, although it is very synthetic and I am not sure if this pattern could be turned into something sane:
(anyway, this case is infinitely less important than the original issue, so it should not block the patch)