Skip to content

Commit

Permalink
GEOS-8216 Fix MenuPageInfo Generics
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsCharlier committed Jul 8, 2017
1 parent 4f5a5ec commit e2d905b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author David Winslow <dwinslow@opengeo.org> * @author David Winslow <dwinslow@opengeo.org>
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class MenuPageInfo extends ComponentInfo<GeoServerBasePage> implements Comparable<MenuPageInfo> { public class MenuPageInfo<T extends GeoServerBasePage> extends ComponentInfo<T> implements Comparable<MenuPageInfo<T>> {
Category category; Category category;
int order; int order;
String icon; String icon;
Expand Down Expand Up @@ -62,7 +62,7 @@ public int getOrder(){
return order; return order;
} }


public int compareTo(MenuPageInfo other){ public int compareTo(MenuPageInfo<T> other){
return getOrder() - other.getOrder(); return getOrder() - other.getOrder();
} }
} }
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ static class Service implements Serializable {
Boolean enabled; Boolean enabled;


/** the admin page for the service */ /** the admin page for the service */
ServiceMenuPageInfo adminPage; ServiceMenuPageInfo<?> adminPage;


/** created service, not yet added to configuration */ /** created service, not yet added to configuration */
IModel<ServiceInfo> model; IModel<ServiceInfo> model;
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.geoserver.web.services; package org.geoserver.web.services;


import org.geoserver.config.ServiceInfo; import org.geoserver.config.ServiceInfo;
import org.geoserver.web.GeoServerBasePage;
import org.geoserver.web.MenuPageInfo; import org.geoserver.web.MenuPageInfo;


/** /**
Expand All @@ -14,7 +15,7 @@
* @author David Winslow <dwinslow@opengeo.org> * @author David Winslow <dwinslow@opengeo.org>
*/ */
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class ServiceMenuPageInfo extends MenuPageInfo { public class ServiceMenuPageInfo<T extends GeoServerBasePage> extends MenuPageInfo<T> {


Class<? extends ServiceInfo> serviceClass; Class<? extends ServiceInfo> serviceClass;


Expand Down

0 comments on commit e2d905b

Please sign in to comment.