Browsing 7239 questions and answers with Jon Skeet
If you've got two threads - one calling the event handlers, and one unsubscribing - there will always be a race condition, where you end up with the following ordering: Event-raiser starts to raise the event Event-unsubscriber... more 5/19/2014 11:54:07 AM
Yes - your Example class is effectively declaring: public Example() { super(); } That won't compile, because the super() call is calling the A() constructor which is declared to throw Exception, which is a checked exception. That's... more 5/19/2014 10:44:42 AM
Firstly, I'd use Type.IsAssignableFrom rather than GetInterfaces, but then all you need to do is exclude types whose parent type is already in the set: var allClasses = types.Where(type => typeof(IFace).IsAssignableFrom(type)) ... more 5/19/2014 10:18:42 AM
The problem is with your Users class. You appear to be expecting it to just pick up the fields, but I don't believe JSONObject does that - instead, it finds bean-like getters. If you try to convert a single instance of your Users class to... more 5/19/2014 8:07:31 AM
Yes, you've discovered that LINQ uses deferred execution. This is a normal part of LINQ, and very handy indeed for building up queries without actually executing anything until you need to - which in turn is great for pipelines of multiple... more 5/18/2014 8:28:45 PM
Well, it's simply that the author of the package has changed the class from public to internal. As far as I can see, that happened in commit 101636. This is a breaking change, so should not have been done in a minor version IMO - but... more 5/18/2014 7:01:37 PM
Very nearly. Three things: You should use new in IAbstract<T> to indicate that you know you're hiding an existing member: new T B { get; } But even without that, you'll still only get a warning. You need to implement the... more 5/18/2014 5:29:17 PM
This makes me wonder if it is something that can be fixed on the Java side? No, absolutely not. Regardless of why you don't happen to see the problem with an Erlang client, if you aren't putting any sort of "message boundary"... more 5/18/2014 4:32:27 PM
I suspect you didn't read the documentation for the (deprecated) Date constructor you're using: Parameters: year - the year minus 1900. month - the month between 0-11. date - the day of the month between 1-31. Avoid using Date... more 5/18/2014 1:21:30 PM
Well you can't safely cast it to a Map<String, String> because even though you know you've only got strings as the values, the compiler doesn't. That's like expecting: Object x = "foo"; String y = x; to work - it doesn't; you need... more 5/18/2014 11:32:51 AM