| Summary: | Warning option for "Unlikely argument type for collection methods using 'Object'" (bug 410218) | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> |
| Component: | UI | Assignee: | Till Brychcy <register.eclipse> |
| Status: | VERIFIED FIXED | QA Contact: | Stephan Herrmann <stephan.herrmann> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | daniel_megert, jarthana, markus.kell.r, register.eclipse |
| Version: | 4.5 | ||
| Target Milestone: | 4.7 M6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/#/c/43884 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=92a55fb8c61c817a37bdd13d873f8eba50e25d7d https://git.eclipse.org/r/43973 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=cfca412f57f26eae63a2010e2327c439d2554f16 https://git.eclipse.org/r/91578 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=3f3a03ae74af438b9ef0dbfb539518bf507ce7cc |
||
| Whiteboard: | |||
| Bug Depends on: | 410218 | ||
| Bug Blocks: | 516946 | ||
|
Description
Stephan Herrmann
https://git.eclipse.org/r/#/c/43884/ has the fix, but Hudson fails because a relevant change in JDT/Core is still unavailable as a nightly build :( Released for 4.5 M6 This feature has been withdrawn from Mars. See bug 410218 comment 31. Thanks, Stephan.
The "Map.get() et al" part of the compiler option needs to be polished a bit:
- we should avoid latin ("e.g." is already at the limit)
- should try to give a general problem description, not just a single example. E.g.: "Unlikely argument type for collection methods using 'Object'"
In org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesConfigurationBlock:
- code style: PREF_15_PB_DISCOURAGED_INVOCATION_UNLIKELY_ARGUMENT_TYPE and PREF_15_PB_DISCOURAGED_INVOCATION_ACCEPT_CASTABLE_ARGUMENT should be defined in the order in which they are shown on the preference page
- #getKeys() missed the PREF_15_PB_DISCOURAGED_INVOCATION_ACCEPT_CASTABLE_ARGUMENT
I've added a test for the latter to the OptionsConfigurationBlockTest (which is not run in the build, since we don't want to create test failures every time jdt.core adds a new option): http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=5ac42d5eb45adc17ab1e8ef893cc7501eb224918
(In reply to Markus Keller from comment #4) > - #getKeys() missed the > PREF_15_PB_DISCOURAGED_INVOCATION_ACCEPT_CASTABLE_ARGUMENT For my education, what is the effect of that omission? I could see that the other key was needed for the "Configure Problem Severity" link, but I saw now reason to add this key. We assume that a project has project-specific settings for a preference page if at least one of the options is stored in the project. Since we always store all project-specific settings (even if their value matches the workspace setting), most of the keys are usually not strictly necessary. But if a user releases a .prefs file with just that one option set, then it becomes necessary. New Gerrit change created: https://git.eclipse.org/r/91578 (In reply to Eclipse Genie from comment #8) > New Gerrit change created: https://git.eclipse.org/r/91578 See https://bugs.eclipse.org/bugs/show_bug.cgi?id=410218#c49. @Stephan, I'm not a jdt.ui committer, so I had to set myself as author to push this to gerrit and I've set you to Also-By. I hope that's ok. Patch set 1 just is the rebased patch, Patch set 2 is updated. Gerrit change https://git.eclipse.org/r/91578 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=3f3a03ae74af438b9ef0dbfb539518bf507ce7cc (In reply to Eclipse Genie from comment #10) > Gerrit change https://git.eclipse.org/r/91578 was merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/ > ?id=3f3a03ae74af438b9ef0dbfb539518bf507ce7cc Released for 4.7 M6 Verified for 4.7 M6 with build I20170307-2000. |