Buggy code:
@ Produces ( { MediaType . APPLICATION_JSON , MediaType . WILDCARD , "application//x-javascript" } ) @ Consumes ( { MediaType . APPLICATION_JSON , MediaType . WILDCARD } ) public class MOXyJsonProvider implements MessageBodyReader < Object > , MessageBodyWriter < Object > { private static final String APPLICATION_XJAVASCRIPT = "application//x-javascript" ; private static final String CHARSET = "charset" ; private static final QName EMPTY_STRING_QNAME = new QName ( "" ) ; private static final String JSON = "json" ; private static final String PLUS_JSON = "+json" ; @ Context protected Providers providers ; private String attributePrefix = null ; private Map < Set < Class < ? > > , JAXBContext > contextCache = new HashMap < Set < Class < ? > > , JAXBContext > ( ) ; private boolean formattedOutput = false ; private boolean includeRoot = false ; private boolean marshalEmptyCollections = true ; private Map < String , String > namespacePrefixMapper ; private char namespaceSeperator = Constants . DOT ; private String valueWrapper ; private boolean wrapperAsArrayName = false ; public String getAttributePrefix ( ) { } protected Set < Class < ? > > getDomainClasses ( Type genericType ) { } private Set < Class < ? > > asSet ( Class < ? > clazz ) { } protected JAXBContext getJAXBContext ( Set < Class < ? > > domainClasses , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , ? > httpHeaders ) throws JAXBException { } private JAXBContext getJAXBContext ( Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType ) { } public Map < String , String > getNamespacePrefixMapper ( ) { } public char getNamespaceSeparator ( ) { } @ Override public long getSize ( Object t , Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType ) { } public String getValueWrapper ( ) { } public boolean isFormattedOutput ( ) { } public boolean isIncludeRoot ( ) { } public boolean isMarshalEmptyCollections ( ) { } @ Override public boolean isReadable ( Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType ) { } public boolean isWrapperAsArrayName ( ) { } @ Override public boolean isWriteable ( Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType ) { } protected void preReadFrom ( Class < Object > type , Type genericType , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , String > httpHeaders , Unmarshaller unmarshaller ) throws JAXBException { } protected void preWriteTo ( Object object , Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , Object > httpHeaders , Marshaller marshaller ) throws JAXBException { } @ Override public Object readFrom ( Class < Object > type , Type genericType , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , String > httpHeaders , InputStream entityStream ) throws IOException , WebApplicationException { } public Class < ? > getDomainClass ( Set < Class < ? > > domainClasses ) { if ( ( domainClasses . size ( ) ) == 1 ) { return domainClasses . iterator ( ) . next ( ) ; } boolean isStringPresent = false ; for ( Class < ? > clazz : domainClasses ) { <START_BUG> if ( ( ! ( clazz . getName ( ) . startsWith ( "java." ) ) ) && ( ! ( clazz . getName ( ) . startsWith ( "javax." ) ) ) ) { <END_BUG> return clazz ; } else if ( clazz == ( String . class ) ) { isStringPresent = true ; } } if ( isStringPresent ) { return String . class ; } if ( ( domainClasses . size ( ) ) >= 2 ) { Iterator < Class < ? > > it = domainClasses . iterator ( ) ; it . next ( ) ; return it . next ( ) ; } return domainClasses . iterator ( ) . next ( ) ; } private boolean wrapItemInJAXBElement ( Type genericType ) { } private Object handleJAXBElement ( Object element , Class domainClass , boolean wrapItemInJAXBElement ) { } public void setAttributePrefix ( String attributePrefix ) { } public void setFormattedOutput ( boolean formattedOutput ) { } public void setIncludeRoot ( boolean includeRoot ) { } public void setMarshalEmptyCollections ( boolean marshalEmptyCollections ) { } public void setNamespacePrefixMapper ( Map < String , String > namespacePrefixMapper ) { } public void setNamespaceSeparator ( char namespaceSeparator ) { } public void setWrapperAsArrayName ( boolean wrapperAsArrayName ) { } public void setValueWrapper ( String valueWrapper ) { } protected boolean supportsMediaType ( MediaType mediaType ) { } @ Override public void writeTo ( Object object , Class < ? > type , Type genericType , Annotation [ ] annotations , MediaType mediaType , MultivaluedMap < String , Object > httpHeaders , OutputStream entityStream ) throws IOException , WebApplicationException { } }

Fix:
if ( ( ( ! ( clazz . getName ( ) . startsWith ( "java." ) ) ) && ( ! ( clazz . getName ( ) . startsWith ( "javax." ) ) ) ) && ( ! ( List . class . isAssignableFrom ( clazz ) ) ) ) {