Sync with 3.1.x
* 3.1.x: Fix false negative test failure in ResourceTests Compensate for Eclipse vs Sun compiler discrepancy
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2009 the original author or authors.
|
* Copyright 2002-2012 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -232,7 +232,7 @@ public class AnnotationConfigUtils {
|
|||||||
}
|
}
|
||||||
if (abd instanceof AbstractBeanDefinition) {
|
if (abd instanceof AbstractBeanDefinition) {
|
||||||
if (metadata.isAnnotated(Role.class.getName())) {
|
if (metadata.isAnnotated(Role.class.getName())) {
|
||||||
int role = attributesFor(metadata, Role.class).getNumber("value");
|
Integer role = attributesFor(metadata, Role.class).getNumber("value");
|
||||||
((AbstractBeanDefinition)abd).setRole(role);
|
((AbstractBeanDefinition)abd).setRole(role);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
package org.springframework.core.io;
|
package org.springframework.core.io;
|
||||||
|
|
||||||
|
import static org.hamcrest.CoreMatchers.nullValue;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
@@ -215,13 +216,8 @@ public class ResourceTests {
|
|||||||
catch (FileNotFoundException ex) {
|
catch (FileNotFoundException ex) {
|
||||||
assertTrue(ex.getMessage().indexOf(name) != -1);
|
assertTrue(ex.getMessage().indexOf(name) != -1);
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
resource.getFilename();
|
assertThat(resource.getFilename(), nullValue());
|
||||||
fail("IllegalStateException should have been thrown");
|
|
||||||
}
|
|
||||||
catch (IllegalStateException ex) {
|
|
||||||
assertTrue(ex.getMessage().indexOf(name) != -1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user