Browse Source
This commit introduces a test that will fail if SynthesizedAnnotation is not public as is required by the contract for getProxyClass() in java.lang.reflect.Proxy. Issue: SPR-13057pull/808/head
3 changed files with 95 additions and 0 deletions
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
/* |
||||
* Copyright 2002-2015 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.core.annotation.subpackage; |
||||
|
||||
/** |
||||
* Class annotated with a non-public (i.e., package private) custom annotation |
||||
* that uses {@code @AliasFor}. |
||||
* |
||||
* @author Sam Brannen |
||||
* @since 4.2 |
||||
*/ |
||||
@NonPublicAliasedAnnotation(name = "test", path = "/test") |
||||
class NonPublicAliasedAnnotatedClass { |
||||
} |
||||
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
/* |
||||
* Copyright 2002-2015 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. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.springframework.core.annotation.subpackage; |
||||
|
||||
import java.lang.annotation.Retention; |
||||
import java.lang.annotation.RetentionPolicy; |
||||
|
||||
import org.springframework.core.annotation.AliasFor; |
||||
|
||||
/** |
||||
* Non-public mock of {@code org.springframework.web.bind.annotation.RequestMapping}. |
||||
* |
||||
* @author Sam Brannen |
||||
* @since 4.2 |
||||
*/ |
||||
@Retention(RetentionPolicy.RUNTIME) |
||||
@interface NonPublicAliasedAnnotation { |
||||
|
||||
String name(); |
||||
|
||||
@AliasFor(attribute = "path") |
||||
String value() default ""; |
||||
|
||||
@AliasFor(attribute = "value") |
||||
String path() default ""; |
||||
} |
||||
Loading…
Reference in new issue