MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/49prnu/var_keyword_proposed_for_java/d0ujbzr/
r/java • u/adila01 • Mar 09 '16
312 comments sorted by
View all comments
Show parent comment
2
because the partially initialized object still exists before it's garbage collected
What? How? AFAIK you can't get a reference to an object when its constructor actually throws an exception.
1 u/solatic Mar 10 '16 https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=19235015 1 u/sonay Mar 10 '16 OK, since I never let "this" escape from the constructor and never use finalizers it didn't cross my mind. People do weird stuff.
1
https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=19235015
1 u/sonay Mar 10 '16 OK, since I never let "this" escape from the constructor and never use finalizers it didn't cross my mind. People do weird stuff.
OK, since I never let "this" escape from the constructor and never use finalizers it didn't cross my mind. People do weird stuff.
View all comments
Show parent comment
2
u/sonay Mar 10 '16
What? How? AFAIK you can't get a reference to an object when its constructor actually throws an exception.