Smart proxies conflicts with testing for Nullable instances
-----------------------------------------------------------

                 Key: FELIX-2353
                 URL: https://issues.apache.org/jira/browse/FELIX-2353
             Project: Felix
          Issue Type: Bug
          Components: iPOJO
    Affects Versions: iPOJO-1.6.0
         Environment: OS: Fedora 11
JVM: Sun JDK 1.6.0_18
OSGi Framework: Equinox 3.5
            Reporter: Sebastien GRIMARD


Smart proxies which were introduced in iPojo 1.6.0 break the "instanceOf 
Nullable" check.

example :

@Component
public class Foo
{

@Required(optional=false)
private Bar bar;

@Validate
public void validate()
{
    if (bar instanceOf Nullable)
    {
        System.out.println("Nullable");
    }
    else
    {
        System.out.println("True implementation");
    }
}

}

Using smart proxies only "True implementation" will ever be printed even if Bar 
has no implementation published.

Workaround: disable smart proxies by setting ipojo.proxy to disabled
priority: major since smart proxies are enabled by default

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to