Skip to content

Commit

Permalink
Compensate for Eclipse vs Sun compiler discrepancy
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cbeams committed Feb 13, 2012
1 parent 0a5392e commit 8e0b1c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -232,7 +232,7 @@ static void processCommonDefinitionAnnotations(AnnotatedBeanDefinition abd) {
}
if (abd instanceof AbstractBeanDefinition) {
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);
}
}
Expand Down

0 comments on commit 8e0b1c3

Please sign in to comment.