Skip to content

Commit 2687cb8

Browse files
committed
DATAMONGO-1373 - Polishing.
Added method, field and annotation target to @field annotation explicitly. Fixed copyright date ranges where needed. Tweaked formatting in test cases. Original pull request: #347. Related ticket: DATACMNS-825.
1 parent b2ce170 commit 2687cb8

File tree

9 files changed

+201
-175
lines changed

9 files changed

+201
-175
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/index/GeoSpatialIndexed.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @author Christoph Strobl
3030
* @author Mark Paluch
3131
*/
32-
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
32+
@Target({ ElementType.FIELD, ElementType.ANNOTATION_TYPE })
3333
@Retention(RetentionPolicy.RUNTIME)
3434
public @interface GeoSpatialIndexed {
3535

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/mapping/Field.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2011-2015 the original author or authors.
2+
* Copyright 2011-2016 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.
@@ -16,8 +16,10 @@
1616
package org.springframework.data.mongodb.core.mapping;
1717

1818
import java.lang.annotation.Documented;
19+
import java.lang.annotation.ElementType;
1920
import java.lang.annotation.Retention;
2021
import java.lang.annotation.RetentionPolicy;
22+
import java.lang.annotation.Target;
2123

2224
/**
2325
* Annotation to define custom metadata for document fields.
@@ -26,6 +28,7 @@
2628
*/
2729
@Documented
2830
@Retention(RetentionPolicy.RUNTIME)
31+
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.ANNOTATION_TYPE })
2932
public @interface Field {
3033

3134
/**

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Meta.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @since 1.6
3030
*/
3131
@Retention(RetentionPolicy.RUNTIME)
32-
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
32+
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
3333
@Documented
3434
@QueryAnnotation
3535
public @interface Meta {

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/Query.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author Mark Paluch
3434
*/
3535
@Retention(RetentionPolicy.RUNTIME)
36-
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
36+
@Target({ ElementType.METHOD, ElementType.ANNOTATION_TYPE })
3737
@Documented
3838
@QueryAnnotation
3939
public @interface Query {

0 commit comments

Comments
 (0)