[Geoserver-devel] [JIRA] (GEOS-10134) Dead code: CatalogFactory.create(Class)

Gabriel Roldan created an issue

GeoServer / TaskGEOS-10134

Dead code: CatalogFactory.create(Class)

Issue Type:

TaskTask

Affects Versions:

2.19.1

Assignee:

Unassigned

Components:

Main

Created:

06/Jul/21 1:24 AM

Priority:

MediumMedium

Reporter:

Gabriel Roldan

Stumbled upon this dead code in CatalogFactory/Impl. Should we just remove it?

CatalogFactory:

    /**
     * Extensible factory method.
     *
     * <p>This method should lookup the appropritae instance of {@link Extension} to create the
     * object. The lookup mechanism is specific to the runtime environement.
     *
     * @param clazz The class of object to create.
     * @return The new object.
     */
    <T extends Object> T create(Class<T> clazz);

    /** Factory extension. */
    interface Extension {

        /**
         * Determines if the extension can create objects of the specified class.
         *
         * @param clazz The class of object to create.
         */
        <T extends Object> boolean canCreate(Class<T> clazz);

        /**
         * Creates an instance of the specified class.
         *
         * <p>This method is only called if {@link #canCreate(Class)} returns <code>true</code>.
         *
         * @param clazz The class of object to create.
         * @param context A context to initialize the object.
         * @return The new object.
         */
        <T extends Object> T create(Class<T> clazz, Map<Object, Object> context);
    }

CatalogFactoryImpl:

    public <T extends Object> T create(Class<T> clazz) {
        return null;
    }

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100168-sha1:f27f540)

Atlassian logo