1

I'm having the same problem as the person who asked this question.

Specifically, the warning is

Type safety: A generic array of Object&Serializable&Comparable is created for a varargs parameter

on this line of code

Collections.addAll(row, name, units, Boolean.FALSE);
// types: List<Object>, String, Integer, Boolean

The solutions posted were lovely, but I was wondering if Eclipse provides another way. Can I change the compiler preferences to ignore that sort of type safety warning? If so, which one would I change?

EDIT: So far, I've tried all the ones in generic types and "Inexact type match for varargs" in Potential Programming Problems." Are there warnings Eclipse won't let me ignore or is there a different one I can turn off?

Community
  • 1
  • 1
Eva
  • 4,397
  • 5
  • 43
  • 65

1 Answers1

3

In Eclipse, you can disable any warnings, and also you can enable some warnings that are disabled by default, under Project->Properties->Java Compiler->Errors / Warnings:

Disable compilation warnings Eclipse

Audrius Meškauskas
  • 20,936
  • 12
  • 75
  • 93