• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What Does This Warning Mean?

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic