Breaking change in FontPreferences

Answered

Hi,

com.intellij.openapi.editor.colors.FontPreferences has been refactored from Class to Interface (https://github.com/JetBrains/intellij-community/commit/2b515b4bb58fc04c3f716147f74069ecf969dd82 ).

This change makes all plugins compiled with API < 2017.2 break at runtime with IntelliJ 2017.2:

Found interface com.intellij.openapi.editor.colors.FontPreferences, but class was expected
java.lang.IncompatibleClassChangeError: Found interface com.intellij.openapi.editor.colors.FontPreferences, but class was expected

 

Compiling the plugin against the new API will make it incompatible at runtime with previous versions of IntelliJ.

1
5 comments

We'll return FontPreferences class for the compatibility, sorry for the problem.

0
Avatar
Permanently deleted user

Ok, thanks for the quick reply.

0

Fixed, please check the next EAP build.

0
Avatar
Permanently deleted user

the problem is still there

IntelliJ IDEA 2017.2 EAP
Build #IU-172.2103.15, built on May 12, 2017
IntelliJ IDEA EAP User
Expiration date: June 11, 2017
JRE: 1.8.0_152-release-845-b3 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

 

I got this when I launch IntelliJ.

Found interface com.intellij.openapi.editor.colors.FontPreferences, but class was expected
java.lang.IncompatibleClassChangeError: Found interface com.intellij.openapi.editor.colors.FontPreferences, but class was expected
at org.sonarlint.intellij.ui.SonarLintRulePanel.<init>(SonarLintRulePanel.java:76)
at org.sonarlint.intellij.ui.AbstractIssuesPanel.createTabs(AbstractIssuesPanel.java:97)
at org.sonarlint.intellij.ui.AbstractIssuesPanel.<init>(AbstractIssuesPanel.java:84)
at org.sonarlint.intellij.ui.SonarLintIssuesPanel.<init>(SonarLintIssuesPanel.java:48)
at org.sonarlint.intellij.ui.SonarLintToolWindowFactory.addIssuesTab(SonarLintToolWindowFactory.java:54)
at org.sonarlint.intellij.ui.SonarLintToolWindowFactory.createToolWindowContent(SonarLintToolWindowFactory.java:44)
at com.intellij.openapi.wm.impl.ToolWindowImpl.ensureContentInitialized(ToolWindowImpl.java:568)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.a(ToolWindowManagerImpl.java:488)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.initToolWindow(ToolWindowManagerImpl.java:491)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$4.run(ToolWindowManagerImpl.java:448)
at com.intellij.openapi.wm.impl.CommandProcessor.b(CommandProcessor.java:93)
at com.intellij.openapi.wm.impl.CommandProcessor.flush(CommandProcessor.java:50)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.h(ToolWindowManagerImpl.java:570)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.access$3500(ToolWindowManagerImpl.java:90)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$InitToolWindowsActivity.a(ToolWindowManagerImpl.java:2491)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.k(IdeEventQueue.java:821)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:649)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:923)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:215)
at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:202)
at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:616)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:422)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:86)
at com.intellij.openapi.progress.impl.CoreProgressManager.b(CoreProgressManager.java:337)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:339)
at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:323)
at com.intellij.openapi.progress.ProgressManager.run(ProgressManager.java:190)
at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:448)
at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:190)
at com.intellij.ide.RecentProjectsManagerImpl.doOpenProject(RecentProjectsManagerImpl.java:60)
at com.intellij.ide.RecentProjectsManagerBase.doReopenLastProject(RecentProjectsManagerBase.java:620)
at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:662)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:437)
at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:398)
at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:387)
at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:373)
at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:44)
at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:230)
at com.sun.proxy.$Proxy54.appStarting(Unknown Source)
at com.intellij.idea.IdeaApplication$IdeStarter.a(IdeaApplication.java:363)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:86)
at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:109)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:118)
at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:361)
at com.intellij.idea.IdeaApplication.a(IdeaApplication.java:206)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.idea.MainImpl$1$1.a(MainImpl.java:70)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:345)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

0

It seems that the change was pushed shortly after 172.2103. Please check 172.2273 when it becomes available.

0

Please sign in to leave a comment.