diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/SynchronizedOnLiteralObject.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/SynchronizedOnLiteralObject.java
index 2125ad639a66..16225de08fb7 100644
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/SynchronizedOnLiteralObject.java
+++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/SynchronizedOnLiteralObject.java
@@ -6,9 +6,9 @@ class SynchronizedOnLiteralObject {
private Character c = 'a';
void foo() {
- synchronized (myInteger) {}
- synchronized ("asdf") {}
- synchronized ((Boolean) true) {}
- synchronized (c) {}
+ synchronized (myInteger) {}
+ synchronized ("asdf") {}
+ synchronized ((Boolean) true) {}
+ synchronized (c) {}
}
}
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/expected.xml
deleted file mode 100644
index c4cfac836961..000000000000
--- a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/synchronized_on_literal_object/expected.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
- SynchronizedOnLiteralObject.java
- 9
- Synchronization on an object initialized with a literal
- Synchronization on Integer <code>myInteger</code> which is initialized by a literal #loc
-
-
-
- SynchronizedOnLiteralObject.java
- 10
- Synchronization on an object initialized with a literal
- Synchronization on String <code>"asdf"</code> which is initialized by a literal #loc
-
-
-
- SynchronizedOnLiteralObject.java
- 11
- Synchronization on an object initialized with a literal
- Synchronization on Boolean <code>(Boolean) true</code> which is initialized by a literal #loc
-
-
-
- SynchronizedOnLiteralObject.java
- 12
- Synchronization on an object initialized with a literal
- Synchronization on Character <code>c</code> which is initialized by a literal #loc
-
-
\ No newline at end of file
diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/threading/SynchronizedOnLiteralObjectInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/threading/SynchronizedOnLiteralObjectInspectionTest.java
index 2013fcdc8449..d6e5c97a141e 100644
--- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/threading/SynchronizedOnLiteralObjectInspectionTest.java
+++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/threading/SynchronizedOnLiteralObjectInspectionTest.java
@@ -1,10 +1,36 @@
+/*
+ * Copyright 2000-2017 JetBrains s.r.o.
+ *
+ * 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 com.siyeh.ig.threading;
-import com.siyeh.ig.IGInspectionTestCase;
+import com.intellij.codeInspection.InspectionProfileEntry;
+import com.siyeh.ig.LightInspectionTestCase;
+import org.jetbrains.annotations.Nullable;
-public class SynchronizedOnLiteralObjectInspectionTest extends IGInspectionTestCase {
+/**
+ * @author Bas
+ */
+public class SynchronizedOnLiteralObjectInspectionTest extends LightInspectionTestCase {
- public void test() throws Exception {
- doTest("com/siyeh/igtest/threading/synchronized_on_literal_object", new SynchronizedOnLiteralObjectInspection());
+ public void testSynchronizedOnLiteralObject() {
+ doTest();
+ }
+
+ @Nullable
+ @Override
+ protected InspectionProfileEntry getInspection() {
+ return new SynchronizedOnLiteralObjectInspection();
}
}
\ No newline at end of file