Skip to content

Commit 8e0b1c3

Browse files
committed
Compensate for Eclipse vs Sun compiler discrepancy
Eclipse allows autoboxing on type inference; Sun javac does not. This means that variables assigned from calls to AnnotationAttributes#getNumber should consistently use object wrappers as opposed to number primitives. There was only one such instance anyway, and has now been updated accordingly.
1 parent 0a5392e commit 8e0b1c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotationConfigUtils.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -232,7 +232,7 @@ static void processCommonDefinitionAnnotations(AnnotatedBeanDefinition abd) {
232232
}
233233
if (abd instanceof AbstractBeanDefinition) {
234234
if (metadata.isAnnotated(Role.class.getName())) {
235-
int role = attributesFor(metadata, Role.class).getNumber("value");
235+
Integer role = attributesFor(metadata, Role.class).getNumber("value");
236236
((AbstractBeanDefinition)abd).setRole(role);
237237
}
238238
}

0 commit comments

Comments
 (0)