• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

What Does This Warning Mean?

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what eclipse/javac is trying to tell me here. Maybe I need more coffee... Anyone know what it means?

"Any data in the field "attribsToCopyInit" should not be specific to the caller of this service. Values in this field will not be consistent across operations or event handlers on this class."

"Any data in the field "attribsToCopy" should not be specific to the caller of this service. Values in this field will not be consistent across operations or event handlers on this class."

Here's the code:

Thanks,

Mark
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes no sense to me. Surely it's not a javac message; if it's an Eclipse message, maybe it's from some non-standard add-on? What sort of stuff have you got installed?
 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I shoulda pasted the code instead of typing it - it's a web service. I edited the code to include the annotations...

It's "BEA Workshop for WebLogic Platform", eclipse based.

Mark
 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm - the IDE started going nuts and crashing (and sending bug reports). I moved the HashSet to be method local (which means the HashSet gets re-initialized each time the method gets called) and it fixed things. Not effecient, but at least the IDE doesn't crash and I don't get warnings... Weird..

Mark
 
Marshal
Posts: 71607
312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the HashSet always contains the same data, why don't you make it static? And maybe even final?
 
Mark Wuest
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:If the HashSet always contains the same data, why don't you make it static? And maybe even final?



Yeah - I intended to do that, but having it anything other than method-local makes the IDE crash. Weird, huh?

Mark
 
Campbell Ritchie
Marshal
Posts: 71607
312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try navigating into your eclipse directories with a command line/terminal/shell, and compile and execute the classes from the terminal. See whether it still produces any errors. You might get complaints from Eclipse later if it finds two copies of a file, but you can sort that out easily enough.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic