Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Commit

Permalink
Fixed some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjardine committed Feb 24, 2016
1 parent 20cf235 commit 05fe15e
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ public void setSelectContraint(final String selectContraint) {
}

public JsArray<JavaScriptObject> getJavaScriptParameters() {
@SuppressWarnings("unchecked")
final JsArray<JavaScriptObject> params = (JsArray<JavaScriptObject>) JsArray.createArray();
setParameter(params, getGeneralDisplay());
setParameter(params, getButtonText());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public Event getNativeEvent() {
return nativeEvent;
}

@SuppressWarnings({"unchecked"})
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Type<TypeaheadAutoCompletedHandler<T>> getAssociatedType() {
return (Type) TYPE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public Event getNativeEvent() {
return nativeEvent;
}

@SuppressWarnings({"unchecked"})
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Type<TypeaheadClosedHandler<T>> getAssociatedType() {
return (Type) TYPE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public Event getNativeEvent() {
return nativeEvent;
}

@SuppressWarnings({"unchecked"})
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Type<TypeaheadCursorChangedHandler<T>> getAssociatedType() {
return (Type) TYPE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public Event getNativeEvent() {
return nativeEvent;
}

@SuppressWarnings({"unchecked"})
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Type<TypeaheadOpenedHandler<T>> getAssociatedType() {
return (Type) TYPE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public Event getNativeEvent() {
return nativeEvent;
}

@SuppressWarnings({"unchecked"})
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public Type<TypeaheadSelectedHandler<T>> getAssociatedType() {
return (Type) TYPE;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
package org.gwtbootstrap3.extras.typeahead.client.ui;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import org.gwtbootstrap3.client.ui.TextBox;
import org.gwtbootstrap3.extras.typeahead.client.base.CollectionDataset;
import org.gwtbootstrap3.extras.typeahead.client.base.Dataset;
import org.gwtbootstrap3.extras.typeahead.client.base.Suggestion;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadAutoCompletedEvent;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadAutoCompletedHandler;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadClosedEvent;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadClosedHandler;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadCursorChangedEvent;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadCursorChangedHandler;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadOpenedEvent;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadOpenedHandler;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadSelectedEvent;
import org.gwtbootstrap3.extras.typeahead.client.events.TypeaheadSelectedHandler;

/*
* #%L
* GwtBootstrap3
Expand All @@ -25,15 +45,6 @@
import com.google.gwt.dom.client.Element;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Event;
import org.gwtbootstrap3.client.ui.TextBox;
import org.gwtbootstrap3.extras.typeahead.client.base.CollectionDataset;
import org.gwtbootstrap3.extras.typeahead.client.base.Dataset;
import org.gwtbootstrap3.extras.typeahead.client.base.Suggestion;
import org.gwtbootstrap3.extras.typeahead.client.events.*;

import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;

/**
* Twitter typeahead.js
Expand All @@ -49,7 +60,8 @@ public class Typeahead<T> extends TextBox {
private int minLength = 1;

public Typeahead() {
setDatasets(new CollectionDataset(Collections.emptyList()));
List<T> empty = Collections.emptyList();
setDatasets(new CollectionDataset<T>(empty));
}

/**
Expand Down

0 comments on commit 05fe15e

Please sign in to comment.