本文整理了Java中java.lang.NoSuchMethodError.getMessage()
方法的一些代码示例,展示了NoSuchMethodError.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchMethodError.getMessage()
方法的具体详情如下:
包路径:java.lang.NoSuchMethodError
类名称:NoSuchMethodError
方法名:getMessage
NoSuchMethodError.getMessage介绍
暂无
代码示例
代码示例来源:origin: org.springframework.boot/spring-boot
private String extractClassName(NoSuchMethodError cause) {
int descriptorIndex = cause.getMessage().indexOf('(');
if (descriptorIndex == -1) {
return null;
}
String classAndMethodName = cause.getMessage().substring(0, descriptorIndex);
int methodNameIndex = classAndMethodName.lastIndexOf('.');
if (methodNameIndex == -1) {
return null;
}
return classAndMethodName.substring(0, methodNameIndex);
}
代码示例来源:origin: org.springframework.boot/spring-boot
private String getDescription(NoSuchMethodError cause, String className,
List candidates, URL actual) {
StringWriter description = new StringWriter();
PrintWriter writer = new PrintWriter(description);
writer.print("An attempt was made to call the method ");
writer.print(cause.getMessage());
writer.print(" but it does not exist. Its class, ");
writer.print(className);
writer.println(", is available from the following locations:");
writer.println();
for (URL candidate : candidates) {
writer.print(" ");
writer.println(candidate);
}
writer.println();
writer.println("It was loaded from the following location:");
writer.println();
writer.print(" ");
writer.println(actual);
return description.toString();
}
代码示例来源:origin: redisson/redisson
String msg = nsme.getMessage();
if (msg != null && msg.contains("org.slf4j.impl.StaticLoggerBinder.getSingleton()")) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;
代码示例来源:origin: wildfly/wildfly
String msg = nsme.getMessage();
if (msg != null && msg.contains("org.slf4j.impl.StaticLoggerBinder.getSingleton()")) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;
代码示例来源:origin: camunda/camunda-bpm-platform
public void loadFromXml(Properties props, InputStream is) throws IOException {
try {
props.loadFromXML(is);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot load properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void storeToXml(Properties props, OutputStream os, String header) throws IOException {
try {
props.storeToXML(os, header);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void storeToXml(Properties props, OutputStream os, String header, String encoding) throws IOException {
try {
props.storeToXML(os, header, encoding);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}
代码示例来源:origin: spring-projects/spring-loaded
Throwable t = ite.getCause();
NoSuchMethodError icce = (NoSuchMethodError) t;
assertEquals("SimpleClass.toInt(Ljava/lang/String;)I", icce.getMessage());
代码示例来源:origin: camunda/camunda-bpm-platform
String msg = nsme.getMessage();
if (msg != null && msg.indexOf("org.slf4j.impl.StaticLoggerBinder.getSingleton()") != -1) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;
代码示例来源:origin: ac-pm/Inspeckage
log(TAG + ex.getMessage());
}catch (NoSuchMethodError ex) {
log(TAG + ex.getMessage());
代码示例来源:origin: com.bbossgroups/bboss-util
public void storeToXml(Properties props, OutputStream os, String header, String encoding) throws IOException {
try {
props.storeToXML(os, header, encoding);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getExternalProjectIdOrNull(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getExternalBuildIdOrNull(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getInternalBuildIdOrNull(SBuildType buildType){
try {
return buildType.getInternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}
代码示例来源:origin: com.bbossgroups/bboss-util
public void storeToXml(Properties props, OutputStream os, String header) throws IOException {
try {
props.storeToXML(os, header);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getInternalBuildId(SBuildType buildType){
try {
return buildType.getInternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getExternalProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getBuildTypeId(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}
代码示例来源:origin: PeteGoo/tcSlackBuildNotifier
public static String getExternalBuildId(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}