Mercurial > hg > truffle
diff graal/com.oracle.jvmci.service/src/com/oracle/jvmci/service/Services.java @ 21633:9966b358bc2b
Services: don't throw exceptions or print warnings when there are no implementations for a non-required service
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Mon, 01 Jun 2015 15:14:20 +0200 |
parents | 2f92172fa320 |
children | 6d9c8d0d0f7c |
line wrap: on
line diff
--- a/graal/com.oracle.jvmci.service/src/com/oracle/jvmci/service/Services.java Mon Jun 01 15:13:16 2015 +0200 +++ b/graal/com.oracle.jvmci.service/src/com/oracle/jvmci/service/Services.java Mon Jun 01 15:14:20 2015 +0200 @@ -22,8 +22,6 @@ */ package com.oracle.jvmci.service; -import static java.lang.String.*; - import java.util.*; import sun.reflect.*; @@ -39,13 +37,7 @@ private static final ClassValue<List<Service>> cache = new ClassValue<List<Service>>() { @Override protected List<Service> computeValue(Class<?> type) { - Service[] names = getServiceImpls(type); - if (names == null || names.length == 0) { - throw new InternalError( - format("No implementations for %s found (ensure %s extends %s and that in suite.py the \"annotationProcessors\" attribute for the project enclosing %s includes \"com.oracle.jvmci.service.processor\")", - type.getSimpleName(), type.getSimpleName(), Service.class, type.getSimpleName())); - } - return Arrays.asList(names); + return Arrays.asList(getServiceImpls(type)); } };