Skip to content

Commit 3cf9cce

Browse files
committed
Renamed readme
1 parent 665c838 commit 3cf9cce

File tree

14 files changed

+136
-273
lines changed

14 files changed

+136
-273
lines changed

README.txt README

File renamed without changes.

blaze-common-utils/pom.xml

+13
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<groupId>com.blazebit</groupId>
77
<artifactId>blaze-utils</artifactId>
88
<version>0.1.6-SNAPSHOT</version>
9+
<relativePath>../pom.xml</relativePath>
910
</parent>
1011

1112
<artifactId>blaze-common-utils</artifactId>
@@ -72,4 +73,16 @@
7273
<scope>test</scope>
7374
</dependency>
7475
</dependencies>
76+
77+
<build>
78+
<pluginManagement>
79+
<plugins>
80+
<plugin>
81+
<groupId>org.codehaus.mojo</groupId>
82+
<artifactId>sonar-maven-plugin</artifactId>
83+
<version>2.0</version>
84+
</plugin>
85+
</plugins>
86+
</pluginManagement>
87+
</build>
7588
</project>

blaze-common-utils/src/main/java/com/blazebit/reflection/LazyGetterMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public LazyGetterMethod(Object source, String[] fieldNames) {
5151
}
5252

5353
this.source = source;
54-
this.fieldNames = fieldNames;
54+
this.fieldNames = fieldNames.clone();
5555
}
5656

5757
/**

blaze-common-utils/src/main/java/com/blazebit/reflection/LazySetterMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public LazySetterMethod(Object target, String[] fieldNames, Object... args) {
5757
}
5858

5959
this.target = target;
60-
this.fieldNames = fieldNames;
60+
this.fieldNames = fieldNames.clone();
6161
this.args = args;
6262
}
6363

blaze-common-utils/src/main/java/com/blazebit/reflection/ReflectionUtil.java

+15-13
Original file line numberDiff line numberDiff line change
@@ -345,19 +345,20 @@ public static Class<?> resolveTypeVariable(Class<?> concreteClass,
345345
resolvedType = parameterizedClassToInspect.getActualTypeArguments()[position];
346346

347347
if (resolvedType instanceof TypeVariable<?>) {
348-
// If the currently available resolvedType is still a type variable
349-
// retrieve the position of the type variable within the type
350-
// variables of the current class, so we can look in the next
351-
// subclass for the concrete type
348+
// If the currently available resolvedType is still a type
349+
// variable
350+
// retrieve the position of the type variable within the type
351+
// variables of the current class, so we can look in the next
352+
// subclass for the concrete type
352353
position = getTypeVariablePosition(classToInspect,
353354
(TypeVariable<?>) resolvedType);
354-
} else if(resolvedType instanceof ParameterizedType){
355-
// Since we can only want a class object, we don't
356-
// care about type arguments of the parameterized type
357-
// and just set the raw type of it as the resolved
358-
// type
359-
resolvedType = ((ParameterizedType) resolvedType).getRawType();
360-
}
355+
} else if (resolvedType instanceof ParameterizedType) {
356+
// Since we can only want a class object, we don't
357+
// care about type arguments of the parameterized type
358+
// and just set the raw type of it as the resolved
359+
// type
360+
resolvedType = ((ParameterizedType) resolvedType).getRawType();
361+
}
361362
}
362363

363364
if (!(resolvedType instanceof Class<?>)) {
@@ -680,8 +681,9 @@ public static Method getMethod(Class<?> clazz, String methodName,
680681
* and if it can not find that method it looks for the isFieldName method.
681682
* If this method also can not be found, null is returned.
682683
*
683-
* This method uses #{@link ReflectionUtil#getMethod(java.lang.Class,
684-
* java.lang.String, java.lang.Class<?>[]) } to retrieve the getter.
684+
* This method uses #
685+
* {@link ReflectionUtil#getMethodReturnType(Class, String, Class...)} to
686+
* retrieve the getter.
685687
*
686688
* A getter must not have any parameters and must have a return type that is
687689
* different from void.

0 commit comments

Comments
 (0)