Skip to content

Commit 03de9bd

Browse files
author
Vladimir Kotal
committed
suppress raw type warnings
1 parent 35d6530 commit 03de9bd

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/authorization/AuthorizationFramework.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,7 @@ public IAuthorizationPlugin handleLoadClass(String classname) {
449449
* @throws NoSuchMethodException when the class does not have no-argument constructor
450450
* @throws InvocationTargetException if the underlying constructor of the class throws an exception
451451
*/
452+
@SuppressWarnings("rawtypes")
452453
private IAuthorizationPlugin loadClass(String classname) throws ClassNotFoundException,
453454
SecurityException,
454455
InstantiationException,
@@ -476,6 +477,7 @@ private IAuthorizationPlugin loadClass(String classname) throws ClassNotFoundExc
476477
* @param c class
477478
* @return array of interfaces of the class c
478479
*/
480+
@SuppressWarnings("rawtypes")
479481
protected List<Class> getInterfaces(Class c) {
480482
List<Class> interfaces = new LinkedList<>();
481483
Class self = c;
@@ -593,7 +595,7 @@ private String getClassName(JarEntry f) {
593595
* @see IAuthorizationPlugin#unload()
594596
* @see Configuration#getPluginDirectory()
595597
*/
596-
@SuppressWarnings("unchecked")
598+
@SuppressWarnings({"rawtypes", "unchecked"})
597599
public void reload() {
598600
if (pluginDirectory == null || !pluginDirectory.isDirectory() || !pluginDirectory.canRead()) {
599601
LOGGER.log(Level.WARNING, "Plugin directory not found or not readable: {0}. "

opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/ConfigurationHelp.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class ConfigurationHelp {
5252
* @return a defined instance
5353
* @throws RuntimeException if an error occurs producing the sample
5454
*/
55+
@SuppressWarnings("rawtypes")
5556
public static String getSamples()
5657
throws RuntimeException {
5758

@@ -103,6 +104,7 @@ public static String getSamples()
103104
return b.toString();
104105
}
105106

107+
@SuppressWarnings("rawtypes")
106108
private static List<Method> getSetters(Class klass) {
107109
List<Method> res = new ArrayList<>();
108110
Method[] methods = klass.getDeclaredMethods();
@@ -121,6 +123,7 @@ private static List<Method> getSetters(Class klass) {
121123
return res;
122124
}
123125

126+
@SuppressWarnings("rawtypes")
124127
private static Object getSampleValue(Method setter, Object defaultValue) {
125128

126129
Class paramType = setter.getParameterTypes()[0];

opengrok-indexer/src/main/java/org/opengrok/indexer/util/ClassUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ private ClassUtil() {
5858
*
5959
* @param targetClass the class
6060
*/
61+
@SuppressWarnings("rawtypes")
6162
public static void remarkTransientFields(Class targetClass) {
6263
try {
6364
BeanInfo info;
@@ -77,7 +78,7 @@ public static void remarkTransientFields(Class targetClass) {
7778
}
7879
}
7980

80-
@SuppressWarnings("unchecked")
81+
@SuppressWarnings({"rawtypes", "unchecked"})
8182
private static Object stringToObject(String fieldName, Class c, String value) throws IOException {
8283
Object v;
8384
String paramClass = c.getName();

0 commit comments

Comments
 (0)