Tuesday 2 March 2010

WTF? Weblogic has a lower-case class called "service"

While writing up some unit tests, I was trying to get IntelliJ IDEA to
automatically create a variable declaration like such:


request.setService(service);

-- normally, what would happen is IDEA would pick up that no
declaration exists for "service", and base on the parameter type
expected by the method call "setService", it would insert a
declaration for "service" of the expected type.

But this didn't seem to happen as normal, and then I noticed in the
imports list:


import weblogic.jms.interception.service;


I clicked on "service" and was taken to this decompiled stub:


package weblogic.jms.interception;

public static final class service {
private static weblogic.jms.interception.service singleton;

private service() throws
weblogic.messaging.interception.exceptions.InterceptionServiceException
{ /* compiled code */ }

public static void initialize() throws
weblogic.messaging.interception.exceptions.InterceptionServiceException
{ /* compiled code */ }

private void registerWithInterceptionService() throws
weblogic.messaging.interception.exceptions.InterceptionServiceException
{ /* compiled code */ }

private class JMSInterceptionPointNameDescriptor extends
weblogic.messaging.interception.interfaces.InterceptionPointNameDescriptor
{
private java.lang.String title;

public JMSInterceptionPointNameDescriptor(java.lang.String p2)
{ /* compiled code */ }

public java.lang.String getTitle() { /* compiled code */ }

public int getTotalNumberOfUniqueValue() { /* compiled code */ }

public boolean isValid(java.lang.String s) { /* compiled code */ }
}
}

No comments: