[514672] respond to strict adapter factory changes upstream Signed-off-by: Rob Stryker <stryker@redhat.com> Change-Id: I4b76a34c9951d52852cb5654a930bf2cd24deca9
diff --git a/plugins/org.eclipse.jst.j2ee/.classpath b/plugins/org.eclipse.jst.j2ee/.classpath index 281ae2f..bf85518 100644 --- a/plugins/org.eclipse.jst.j2ee/.classpath +++ b/plugins/org.eclipse.jst.j2ee/.classpath
@@ -14,6 +14,6 @@ <classpathentry kind="src" path="refactor"/> <classpathentry kind="src" path="classpathdep"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk18"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="output" path="bin"/> </classpath>
diff --git a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/VirtualArchiveComponentAdapterFactory.java b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/VirtualArchiveComponentAdapterFactory.java index a7b6a33..f328198 100644 --- a/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/VirtualArchiveComponentAdapterFactory.java +++ b/plugins/org.eclipse.jst.j2ee/common/org/eclipse/jst/j2ee/internal/common/VirtualArchiveComponentAdapterFactory.java
@@ -17,8 +17,9 @@ public class VirtualArchiveComponentAdapterFactory implements IAdapterFactory { + @Override public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adapterType == VirtualArchiveComponent.ADAPTER_TYPE ) { + if (adapterType == IPath.class && adaptableObject instanceof VirtualArchiveComponent ) { VirtualArchiveComponent component = (VirtualArchiveComponent) adaptableObject; IPath path = J2EEProjectUtilities.getResolvedPathForArchiveComponent(component.getName()); return path; @@ -26,9 +27,9 @@ return null; } - + @Override public Class[] getAdapterList() { - return new Class[]{VirtualArchiveComponent.class}; + return new Class[]{ IPath.class }; } }