This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 152419 [details] example project and thus can cause uncompilable code after refactoring. The example class is package de.richtercloud.unnecessary.call.to.string; import com.orientechnologies.common.util.OCallable; import com.orientechnologies.orient.core.metadata.schema.OClass; import com.tinkerpop.blueprints.Features; import com.tinkerpop.blueprints.impls.orient.OrientBaseGraph; import com.tinkerpop.blueprints.impls.orient.OrientEdgeType; import com.tinkerpop.blueprints.impls.orient.OrientVertexType; /** * example taken from orientdb's * com.tinkerpop.blueprints.impls.orient.OrientBaseGraph * * @author richter */ public class UnnecessaryCallToString extends OrientBaseGraph { public UnnecessaryCallToString(String url) { super(url); } @Override public OrientVertexType createVertexType(final String iClassName) { makeActive(); return createVertexType(iClassName, (String) null); } @Override public OrientEdgeType createEdgeType(final String iClassName) { makeActive(); return createEdgeType(iClassName, (String) null); } @Override public OrientEdgeType createEdgeType(final String iClassName, final String iSuperClassName) { return createEdgeType(iClassName, iSuperClassName == null ? getEdgeBaseType() : getEdgeType(iSuperClassName)); } @Override public OrientEdgeType createEdgeType(final String iClassName, final OClass iSuperClass) { return executeOutsideTx(new OCallable<OrientEdgeType, OrientBaseGraph>() { @Override public OrientEdgeType call(final OrientBaseGraph g) { return new OrientEdgeType(g, getRawGraph().getMetadata().getSchema().createClass(iClassName, iSuperClass)); } }, "create edge type '", iClassName, "' as subclass of '", iSuperClass.getName(), "'"); } @Override public Features getFeatures() { throw new UnsupportedOperationException("Not supported yet."); } } I created and attached a sample maven project (which depends on orientdb - I don't seem to figure out what the cause is and didn't manage to create a project from scratch).
The cast of `null` to `String` is necessary in both cases and the "Typecast to strong" inspection causes uncompilable source code because the call to `createEdgeType` and `createVertexType` is ambiguous without the casts.
Should be already fixed in dev version as part of issue #243581