score:1
although your warning message are inconsistent for some reason (you should get warnings on both), the fix for your situation is to change:
public <t extends ball> ballcontroller<t> getballcontroller(t ball) {
to
public <t extends ball> ballcontroller<?> getballcontroller(t ball) {
and remove the casts:
return (ballcontroller<t>) getbaseballcontroller();
return (ballcontroller<t>) someotherclass.getfootballcontroller();
like:
return getbaseballcontroller();
return someotherclass.getfootballcontroller();
Source: stackoverflow.com
Related Query
- Why no Unchecked Cast warning when using delegate method?
- Why does Android Lint warn about String.format using default locale when explicitly using Locale.US?
- Why do I get message: "Unhandled event loop exception Java heap space" in Eclipse when using javascript autocomplete?
- Spring/Eclipse 'referenced bean not found' warning when using <import>?
- unchecked cast warning - how to avoid this?
- Why does eclipse automatically add a java super() method in a constructor when I use the editors code generator?
- When using Mylyn in Eclipse, why do task context elements not show up in the navigator view?
- Why is maven dependency being added automatically to pom when using Eclipse (STS 3.5.1)?
- Eclipse content assist not working when using Method reference inside Stream.map
- How to find the caller method when debugging using Eclipse
- PyDev: ImportError when trying to call user-defined Java Method using Jython in Eclipse
- Why is my java code only using about 20% of CPU when there is no GUI
- Why is Eclipse reporting Interpreter not found when using an anaconda environment with pydev?
- Why am I getting a SLF4J Error when I'm not using it?
- Syntax error in Eclipse when using static getNames method of JSONObject Java class
- How to deal with warning 'unsafe null type convertion' when using java.lang.Optional
- Eclipse - maven warning when using parent project resources folder
- Why is a menu item disabled when using SWTBot?
- How to solve warning when using liferay-ui:search-container in JSP?
- Why am I getting an error for main method not being found when running an example program?
- Eclipse - generate a warning when using map.get with an unexpected type
- Why is there an error when using containsKey() and getString() on type PageParameters?
- Why I have these errors when I try to compile using this Ant script?
- Why is Eclipse using JUnit 3 when I have junit-4.3.1.jar in my build path?
- Method folding in eclipse when using export class
- How to remove 'nullness annotation is redundant' warning when using @NonNullByDefault and arrays? (Eclipse, NullAnnotation)
- Eclipse: Why and when to add libraries to build path when using Maven project to not have defective Eclipse project?
- why i am not getting output when i am using number var in Eclipse in build browser.?
- com.sun.jdi.InvocationException occurred invoking method toString when using switch-case inside it
- Type safety warning when using synchronizedList
More Query from same tag
- Write unit tests with TestNG in Eclipse
- JSF Resourece Bundle Can't find bundle for base name com.arc.ifuss.util.messages.properties
- Delete android sqlite database file
- Java RESTfull web service with tomcat and eclipse gives 404
- Changing Theme in Android Manifest Crashes App - Easy Solution?
- Password Style TextCellEditor showing original characters in TableViewer
- Eclipse - open all files in current working set?
- HOW TO USE THE CLASS OF "openPerspectiveMenu" IN A CLASS?
- Can not run imported maven project on STS
- eclipse breaking inside a class file
- Spring context is reloaded everytime there is a change during debugging in tomcat eclipse
- Unable to execute dex: method ID not in [0, 0xffff]: 65536 Error in Eclipse
- Eclipse debug execute Java program without stopping at breakpoint
- Eclipse IDE doesn't read keyboard presses until I click in the console
- Target Platform for PDE Headless build does not work
- "projectId must match the following pattern" exception when running Objectify on Google Cloud tools for Eclipse
- Java Eclipse Swing Designing
- Eclipse refresh current file in editor
- How to make eclipse neon show git branch in package view?
- 'Prevented recursive attempt to activate part' when clicking on a marker
- Spring framework/Eclipse RCP integration with Blueprint Gemini
- Eclipse error: a Child component failed during start java.util.concurrent.ExecutionException:
- WizardNewFileCreationPage order
- how to show dialog after ten button click
- Eclipse/Maven: JUnit tests not compiled when running them
- Eclipse loop: reading history from git repository
- Adding connector in Subversive
- Move app to phone
- Android- skipping a page in View pager depending on certain condition
- setting up ecipse neon EE for dynamic web