1
1
package software .xdev .saveactions .processors .java .inspection ;
2
2
3
- import software .xdev .saveactions .core .service .SaveActionsService ;
4
3
import com .intellij .codeInspection .LocalInspectionTool ;
5
4
import com .intellij .openapi .diagnostic .Logger ;
5
+ import software .xdev .saveactions .core .service .SaveActionsService ;
6
6
7
7
import java .lang .reflect .InvocationTargetException ;
8
8
import java .util .Arrays ;
@@ -31,11 +31,7 @@ public static LocalInspectionTool get() {
31
31
32
32
private enum SerializableClass {
33
33
CLASS_NAME_INTELLIJ_2021_3 ("com.intellij.codeInspection.SerializableHasSerialVersionUidFieldInspection" ,
34
- "software.xdev.saveactions.processors.java.inspection.CustomSerializableHasSerialVersionUidFieldInspection" ),
35
- CLASS_NAME_INTELLIJ_2018_3 ("com.siyeh.ig.serialization.SerializableHasSerialVersionUIDFieldInspection" ,
36
- "com.siyeh.ig.serialization.SerializableHasSerialVersionUIDFieldInspection" ),
37
- CLASS_NAME_INTELLIJ_2016 ("com.siyeh.ig.serialization.SerializableHasSerialVersionUIDFieldInspectionBase" ,
38
- "com.siyeh.ig.serialization.SerializableHasSerialVersionUIDFieldInspectionBase" );
34
+ "software.xdev.saveactions.processors.java.inspection.CustomSerializableHasSerialVersionUidFieldInspection" );
39
35
40
36
/**
41
37
* Field className: Inspection class provided by IDE
@@ -61,7 +57,8 @@ public LocalInspectionTool getInspectionInstance() {
61
57
Class .forName (targetClass ).asSubclass (LocalInspectionTool .class );
62
58
LOGGER .info (String .format ("Found serial version uid class %s" , targetInspectionClass .getName ()));
63
59
return targetInspectionClass .cast (targetInspectionClass .getDeclaredConstructor ().newInstance ());
64
- } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException | InvocationTargetException e ) {
60
+ } catch (ClassNotFoundException | IllegalAccessException | InstantiationException | NoSuchMethodException
61
+ | InvocationTargetException e ) {
65
62
return null ;
66
63
}
67
64
}
0 commit comments