17 ms·
Add detailed message to NullPointerException describing what is null
- rainhacker 8y agoBut they are still calling it NullPointerException, not NullReferenceException. I guess this change is too invasive
- TheRealPomax 8y agoOnly a little: it would be a backwards incompatible change affecting pretty much all production java code ever written, requiring everyone on the planet spend time and money on uplifting all their code for what is really just a cosmetic change =)
- joemccall86 8y agoThis would be immensely beneficial, and long overdue in my opinion.
- hu3 8y agoImagine how many thousand man-hours would be saved in debugging if this existed a decade ago. Little things like this over time adds up.
- phinnaeus 8y agoIf nothing else, it is really interesting to see exactly why this is hard.
- akerro 8y agoHistoric reasons, Java used to be bloated so things like these were not included, not computers are faster, have more memory and object metadata can be expanded.
- WrtCdEvrydy 8y ago> have more memory The L in Java stands for Low Memory.
- akerro 8y agoNice joke from 2002
- WrtCdEvrydy 8y agoLast time someone was let down by Java...
- xxs 8y agopretty much since early 2000s java has always had 'free' null derefencing and OS traps for addressing the zeroth page. each dereference where NPE can occur has had 'metadata'. It's compiling metadata not object one.
- edoo 8y agoIt is almost 2020 so it is reasonable to know what the actual error is. This reminds me of old C/C++ parsers that couldn't tell you what line was expecting a bracket or semicolon and you got to manually find the parse error.
- gldev3 8y agoI don't know why i find this so funny but it's definitely something that would be greatly appreciated!
- on_and_off 8y agoI don't see that many NPE in kotlin these days but pretty sure that on java/Android I get a useful error message. Is that an ART/Dalvik feature ?
- m0skit0 8y agoI don't remember getting any useful error message, but I've been using Kotlin for 3 years now, so I might not remember correctly. Can you post a stacktrace of what you're referring to?
- on_and_off 8y agoas stated in another comment, you get : s exception: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Integer.toString()' on a null object reference the name of the method causing the crash (toString in that sample) + the line number and location thanks to the stacktrace (although in some rare case it is 100% accurate, but still pretty close, maybe that's due to runtime inlining) and it is very trivial to know where the exception comes from.
- pkulak 8y ago> I don't see that many NPE in kotlin these days Nice humble brag. :D
- kllrnohj 8y ago> Is that an ART/Dalvik feature ? Yes, ART has had this for a few years now. For example in Oreo this code: static Integer nums[] = new Integer[100]; public static String stabSelf() { return nums[new Random().nextInt(100)].toString(); } Will produce this exception: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Integer.toString()' on a null object reference
- Insanity 8y agoThis sounds like a good addition. It happens quite often that we get a bug report with "We got a NPE". Our users often attach a screenshot, just showing the standard "NPE error" message, which does not really help.
- jschwartzi 8y agoThat's like every bug report I get from non-technical users at my company. "The device doesn't work. Can you log in and take a look at the logs?" Yeah, if you can give me some information about which device it is I'd be happy to.
- jimmaswell 8y agoMeanwhile, for as long as I can remember, Visual Studio could easily jump straight to the offending null variable when debugging C#.
- zahrc 8y agoThere’s a difference between an IDE offering it, or the JDK
- Gibbon1 8y agoThe CLR gives you all that information. It's not just an IDE thing.
- peteri 8y agoStill an open issue https://github.com/dotnet/coreclr/issues/25 https://github.com/dotnet/coreclr/issues/25 The debugger in VS2017 does give the information, but I suspect thats just by re-evaluating the expression.
- deleted 8y ago[deleted]
- Gibbon1 8y agoI seem to remember that too, null pointer exception coughs up more than enough information to figure out where it barfed. Makes me feel that complaints about null aren't really about null itself but languages and OS's not generating useful error messages.
- theandrewbailey 8y agoThis would be good, but I'd prefer that Java have something like the null operators that C# has. https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-conditional-operators https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- jason0597 8y agoWell, Kotlin has it at least https://kotlinlang.org/docs/reference/null-safety.html https://kotlinlang.org/docs/reference/null-safety.html
- didymospl 8y agoAdding Elvis and safe navigation operators to Java was discussed before Java 7, over 10 years ago. Sadly they never made it even to the official proposal lists and with Optional introduced in Java 8 I don't think we'll get them any time soon. See also Brian Goetz opinion on that subject: https://youtu.be/FdkPHShh628?t=50m17s https://youtu.be/FdkPHShh628?t=50m17s
- deleted 8y ago[deleted]
- Someone1234 8y agoPlus C# is introducing non-nullable reference types (null becomes opt in). https://msdn.microsoft.com/en-us/magazine/mt829270.aspx?f=255&MSPPError=-2147217396 https://msdn.microsoft.com/en-us/magazine/mt829270.aspx?f=25...
- rb808 8y agoI'm a bit torn on this because I always avoided having too many method calls on the same line. Code Complete recommended this a long time ago. However now I see just about everyone stacking this method calls one after the other. Is this just acceptable now? state = stateFromPostcode(customer.getAddress().getPostCode());
- EpicEng 8y agoDepends really. Can getAddress() return null or is it guaranteed to be there per your system design? If it's not then that code is wrong, but if you know your invariants and enforce them higher up the chain then perhaps not. I realize that all sounds very obvious, but like most things... it really does depend. It can certainly make debugging harder if you need to step through. Personally I try to write code which simply doesn't allow nulls below the first layer they may be encountered. Not always possible though (e.g. nullable fields in entities and whatnot.)
- nradov 8y agoThis is where annotation based null analysis can really help. https://dzone.com/articles/eclipse-annotation-based-null-analysis https://dzone.com/articles/eclipse-annotation-based-null-ana...
- toyg 8y ago> Is this just acceptable now? No, but where before it was a hard requirement in Java to deal with NPEs, newer libs are less likely to return nulls, so it's usually a bit safer than it was. You also avoid leaving references around that could potentially leak. There is also a bit of fashion with streams and JS-inspired call-chaining.
- jandrese 8y agoIsn't this what you get when you drink heavily of the Lambda Kool-Aid?
- hnthroaway1926 8y ago
- jayd16 8y agoCan we add column numbers to the stack traces? Seems like that would solve this in the general case.
- deleted 8y ago[deleted]
- xxs 8y agono, not really. Java Class format doesn't support columns, just lines.
- TheRealPomax 8y agoJust imagine the request read "Can we add column numbers to the stack traces? And to whatever code that relies on to add column numbers to stack traces?"
- xxs 8y agoAll the existing code and libraries have to be recompiled. Non-javac compilers have to be updated, etc. Pretty much all byte code editing tools would be obsolete as the constant pool needs change and so on. Also the generated byte code would be more verbose (worse load times) The current change is easy to implement and it'd work on code compiled for/with java 1.0.
- jtdev 8y agoOther than supporting and working with legacy software, I cannot muster any reason to write code in Java at this point... it’s just a terrible language to work with.
- jtdev 8y agoDownvote if you must... but deep down you know it’s true.
- Dylan16807 8y agoThe problem is that "I don't like Java a lot." does not contribute to this discussion at all.
- _ZeD_ 8y agofor one, after some scala exposure, I am missing the "simplicity" of java.
- oftenwrong 8y agoJava sucks in a lot of ways, but the reasons why it sucks and the methods for mitigating the parts that suck are well-known. On the plus side, you get an ecosystem with high-quality libraries and tooling that actually come with documentation and examples, you get a good-enough type system to allow reasonably safe and strict development, and you can easily find solutions for any pitfalls you fall into because it's likely 1000+ people have already done the same. As a member of the http://boringtechnology.club/ http://boringtechnology.club/, I embrace Java's warts and enjoy its usefulness. My advice: - avoid frameworks like the plague - write in a functional style - lean on the type system as much as possible - don't chase the trendy stuff - avoid annotations - use code generation
- js8 8y agoI am not really that familiar with Java, but I don't understand how to get a JVM heap dump if there is an exception that brings down the JVM or even a thread. Is it even possible? I work on mainframe (z/OS), and it is completely normal there that when an application fails with exception (they're called ABENDs - from ABnormal ENDing), you can get a dump of memory of the application. From that, you can see all the values of the offending variables and all the relevant system areas and so on.
- jillesvangurp 8y agoYou can turn this on but the dumps are kind of huge. Also, you can attach to a running JVM and get a memory dump that way. NPEs don't bring down the JVM though unless that happens in your main method of course, in which case the process exits normally.
- js8 8y agoWhat I mean, to produce the dump in the case of exceptions that percolate to top level and exit the process or thread (such as NPE). I am aware that I can attach, but that kind of defeats the ability to get the information in case of unexpected error (in production). Dumps might be huge, but is that really a problem on modern hardware? On z/OS this is doable (and common practice).
- coldtea 8y ago>What I mean, to produce the dump in the case of exceptions that percolate to top level and exit the process or thread (such as NPE). Why not have a top level try catch then?
- js8 8y agoIf you have a top level catch, then you lose the local context of the error (local variables, parameters, stack trace). I mean seriously, this is a solved problem on z/OS (the ABEND condition bypasses normal stack, so to speak), it has been solved for over 50 years. I don't see why JVM couldn't do the same thing - is it a technical problem? It seems like a purely cultural problem to me.
- yxhuvud 8y agoBetter than nothing, but worse than having a type system than disallows the exception it in the first place.
- tantalor 8y agoMaybe or optional types don't really help because your "get value" functions also throw exceptions, or have undefined behavior, if the value doesn't exist. Examples: https://en.cppreference.com/w/cpp/utility/optional/value https://en.cppreference.com/w/cpp/utility/optional/value https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html#get-- https://docs.oracle.com/javase/8/docs/api/java/util/Optional...
- lmm 8y agoNonsense. Obviously if you make every single value in your program with an option then you have the same problem as if your language had null. But the difference is that in a language that has optional types, it becomes practical to have values that aren't optional. And for values that really are meant to be optional, you don't use the "get value" functions (which really shouldn't exist at all), you use functions that handle both cases.
- the_af 8y agoYou are not supposed to do a get on an Option type; it's an antipattern. You're supposed to map over them, and when you really need the value, to pattern match the Some and Nothing cases, which cannot blow up in your face.
- layoutIfNeeded 8y agoBad advice. If you're given an Optional that's guaranteed to have a value, it's better to call get and blow up if someone violates this invariant than to silently ignore the invalid input via pattern matching or optional chaining. Crashing is better than silently ignoring logic errors. Of course, one could ask what's the point of an Optional that's guaranteed to be non-nil. Well, it often happens that there's some relationship between a set of values that's hard/awkward to express via the type system. E.g. a toy example would be that A and B can both be nil, but it also holds that (A == nil) == (B == nil).
- goshx 8y agoFinally someone noticed it!
- kazinator 8y agoThis is too much of a hack; I predict it will be unreliable, at times sending programmers on wild goose chases more time-wasting than an uninformed investigation.
- kbenson 8y agoBecause of some track record of Java, or because you just have a feeling about it? I don't program in Java at all, and frankly, I was flabbergasted to see a change as obvious and useful as this wasn't already in there a decade ago. Or at least 3-4 years ago where a lot more languages started advertising better compilation error messages.
- cesarb 8y ago> Because of some track record of Java, or because you just have a feeling about it? It's proposing to reverse-engineer the corresponding source code from the bytecode when encountering the exception. That does sound like a potentially unreliable hack.
- repolfx 8y agoNot necessarily. The sort of dataflow analysis they're talking about is an inherent part of bytecode verification already. A more advanced version of it is done every time a class is loaded. JVM bytecode is designed to make this sort of thing possible.
- _ZeD_ 8y agothis is good stuff. please come back 10 years ago and do it!
- nailer 8y agoMaybe 20 - I graduated high school in 1998 and in 1999 Java had taken over a lot of the more "industry oriented" CS schools in my country (Australia).
- sisu2019 8y agoI am so frustrated at the slow pace of java but then I remember that for some reason everyone is using JS now and laugh in at-least-some-semblance-of-typesafety (also stacktraces, a module system not invented by a SF hobo, a real compiler and build systems that aren't a complete disaster)
- 4thaccount 8y agoI don't write Java, but support an application written in Java that gets null pointer issues and aborts all the time. It's also annoying that there is precious little information for me to go on.
- chapium 8y agoIt generally means that an object was supposed contain data, but it doesnt. This typically could mean the network disconnected or a file was not read. You could be missing .jar files that contain the appropriate classes. It can also be a programmer mistake. Its not a very clear error, but you can narrow down the issue to a few things even when doing application support.
- 4thaccount 8y agoIn our case it is reading from an antiquated non relational database and usually one of the millions of fields that were being parsed had a "null" value. It is easy to fix, but only if I know which ones the app needs.
- chapium 8y agosounds rough
- RoadieRoller 8y agoBlame it on the poorly written code, not Java.
- deepsun 8y agoHow long do you support the application? I believe that if you support it long enough, it's your application now, so no one else is to blame. How long is long enough? I'd say 1k-2k of lines of code per month of supporting it should be pretty reasonable. So if you supported a project of 10k lines for a year -- it's yours now, stop blaming original authors. Good engineer would start improving it little-by-little, or convince manager that they need to spend some time on refactoring some piece of it. That differentiates a coder from an engineer.
- jackvezkovic 8y agoThat moment when you step out of your safe Scala world just to realize that people still face NPEs.
- darksaints 8y agoI write exclusively in Scala, but NPEs still exist. The moment you introduce a java library to your code, you become vulnerable to them. And if you have an inexperienced java developer switching over to scala, you'll get nulls in scala code as well. And in performance critical code you might find them as well. Sometimes dereferencing an option is too costly, so you put up with an anti-pattern in order to get lower latency or higher throughput.
- _Codemonkeyism 8y agoAfter 20 years, first in Java and then in Scala I've been tortured by this error message. Some years ago they fixed ClassCastException which for a long time also didn't tell you what was wrong. There are some others if I remember correctly with bad error messages, like NumberFormatException. In general error messages on the JVM are very bad, wish they would take a look at Elm error messages. I've left this year the JVM for TS, but glad for everyone who uses the JVM.
- hnthroaway1926 8y agoThe default compiler options for java provide a lot of information on null pointer exceptions. I'm sort of blown away that so many on this thread are confounded by NPEs, in my view they are dead simple to track down if you have access to the source.
- _Codemonkeyism 8y agoAs I'm running a legacy larger Scala app, what would that compiler options be? e.g. for the line service.withName(customer.getName().firstName); with a NPE in line 25?
- hnthroaway1926 8y agoBreak out the line into multiple lines... String s = customer.getName().firstName; service.withName(s);
- wtetzner 8y agoSo the answer is rewrite your code to work around tooling deficiencies? I'd prefer this be fixed in the JVM, so you can decide to write your code in the way that's most readable, and not be forced to write it a certain way because the tools suck.
- _Codemonkeyism 8y agoYes, this is what I'll need to do every time, which is crazy to adapt your code to the tools and then back again. And it's even val n = customer.getName() val f = n.firstName service.withname(f) Gladly with Some/None NPEs happen seldom with Scala but they do from interfacing with Java libs from time to time.
- evancox100 8y ago> Computation overhead > NullPointerExceptions are thrown frequently. "Frequently" is obviously a relative term, but are NullPointerExceptions really common enough to be a performance concern? It's good that they are taking performance overhead into consideration of course, I'm just surprised it's even an issue.
- idbentley 8y agoI've worked with developers who use this pattern frequently for code execution. try{ .. business logic .. } catch (NullPointerException e) { .. else .. } Rather than a null guard. That's what occurred to me.
- AaronFriel 8y agoThis is arguably more robust, because "foo.bar.quux.doTheThing()" is three potential null pointer exceptions in a row, and the code to do consecutive testing is ugly and verbose.
- runarberg 8y agoIn JavaScript I often find my self running the code in both firefox and chrome to get the full picture of what is undefined: (firefox) window.foo.bar //=> TypeError: window.foo is undefined and what I'm trying to get: (chrome) window.foo.bar //=> Uncaught TypeError: Cannot read property 'bar' of undefined Personally I find the firefox error message more useful, but often I get a better understanding of whats wrong when I run it in chrome. I don’t know why they are mentioning undefined at all and don’t say something like: TypeError: Cannot read property 'bar' of 'window.foo' (undefined) --- Edit: Formatting
- zamadatix 8y agoOn Chrome if you click the hyperlink on the far right side of the error it brings you to the line that caused the error. Not as easy as if it were displayed as part of the error but easier than switching between browsers.
- ashelmire 8y agoThis helps but isn't always sufficient, for example in conditionals where comparing property x of two different objects. I like the solution proposed here.
- bzbarsky 8y agoThe worst part is that Firefox tried to change the error message it throws to include the "bar" piece of information, and that had to be reverted because it broke sites that were parsing the exception message with regexps. :( See https://bugzilla.mozilla.org/show_bug.cgi?id=1498257 https://bugzilla.mozilla.org/show_bug.cgi?id=1498257 for the gory details, though it was not the only site affected: see also https://bugzilla.mozilla.org/show_bug.cgi?id=1490772 https://bugzilla.mozilla.org/show_bug.cgi?id=1490772 (fixed by site author) and https://bugzilla.mozilla.org/show_bug.cgi?id=1512401 https://bugzilla.mozilla.org/show_bug.cgi?id=1512401 (fixed by the backout).
- gpm 8y agoAnyone know what the future of this is? Sounds like they were considering trying to get sites to fix this and then redo the change, but it's not clear what happened to that in the last 5 months.
- cpeterso 8y agoWhen Firefox tried to make the "X is undefined" JavaScript exception message user-friendlier, it broke flipkart.com. The website's JavaScript explicitly depended on the exact wording of exception messages. Simply loading the flipkart.com home page caused "X is undefined" exceptions, which it tried to parse with regular expressions. The new exception message had to be reverted. :( https://www.fxsitecompat.com/en-CA/docs/2018/improved-javascript-error-message-breaks-code-relying-on-the-legacy-format/ https://www.fxsitecompat.com/en-CA/docs/2018/improved-javasc... This is an unfortunate example of Hyrum's Law: "With a sufficient number of users of an API, all observable behaviors of your system will be depended on by somebody." http://www.hyrumslaw.com/ http://www.hyrumslaw.com/
- ubertaco 8y agoWhy in the world was Flipkart regexing for an "X is undefined" message? That seems as brittle as possible.
- klmr 8y agoWhy in the world did Firefox care enough to revert the behaviour, rather than telling them to go to hell?
- runarberg 8y agoBecause it is the right thing to do. First, you shouldn’t brake the web. Second, you shouldn’t be mean to people. Some people do stupid things (perhaps they don’t know any better), accommodating for them and helping them do the right thing, is a far better option, then to ignore and shame them.
- mbrameld 8y agoI would argue that coddling FlipKart's engineers is NOT the right thing to do. Educate them on why what they did was wrong, help them fix it, but don't punish the rest of the world for one company's mistakes. Similarly, I would argue that by relying on undefined behavior it was the FlipKart engineers breaking the web.
- EmpirePhoenix 8y agoFunny thing, some JVM's already do exactly this for many years: Failed to write HTTP message: org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: while trying to invoke the method de.hybris.platform.catalog.model.CatalogModel.getId() of a null object returned from de.hybris.platform.catalog.model.CatalogVersionModel.getCatalog();
- copperx 8y agoIt would be useful to know what JVM is that.
- michaelper22 8y agoProbably SAP's, since Hybris is an SAP product.
- chopin 8y agoSAP's definitely does this, I just checked. In fact I relied on it so much that I thought every JVM does this.
- xxs 8y agothis is a json serializer, =NOTHING= to do with compiled dererences.
- mark242 8y agoBetter idea: Optional.ofNullable(foo).orElse(new Foo())
- leothekim 8y agoAnd remove `Optional.get()`.
- deepsun 8y agoIn kotlin: `foo ?: Foo()` Although I'd rather creating objects if not needed to be easier on memory.
- erik_seaberg 8y agoIn Java that's Optional.ofNullable(foo).orElseGet(Foo::new) to avoid side effects from building a throwaway object.
- nickodell 8y ago>As computing the NullPointerException message proposed here is a considerable overhead, this would slow down throwing NullPointerExceptions. You could lower the overhead by not producing these messages if the exception is thrown frequently. It would be similar to the existing OmitStackTraceInFastThrow mechanism [0]. [0]: https://www.oracle.com/technetwork/java/javase/relnotes-139183.html https://www.oracle.com/technetwork/java/javase/relnotes-1391...
- kords 8y agohopefully we'll see the same thing in "Object reference not set to an instance of an object" exceptions in .NET
- hnthroaway1926 8y agoInteresting, so they want to go beyond the line number of the exception and include information on what on the line is null. It's sort of funny that their example doesn't follow the usual Java style guidelines of encapsulating member variables in the parent and using set() and get() methods for access. a.to_b.to_c.to_d.num = 99; This could be rewritten as a method in 'A' as... protected void setDNum(int num) { C c = b.getC(); D d = c.getD(); d.setNum(99); } In this case, a nullpointerexception would include the line number (using default compiler options) clearly indicating which is null.
- jolmg 8y agoI wonder if it's possible to add something similar to the protection you get in Haskell to other languages via some static analyzer or something. In Haskell, it's pretty much impossible to have unexpected nulls because the ability to return nulls is something that is expressed in the type and needs to be handled before working with the possible type to be able to pass the type-check of the compiler. For example, if I had a function: findFistOdd :: [Int] -> Maybe Int That returned the first odd number in a list of numbers, the Maybe wraps the return value so the result is either `Nothing` or `Just someNumber`. I can't work with the result directly like 1 + findFirstOdd [2,3] It would fail the type check, because I need to tell the compiler what the program should do if findFirstOdd couldn't find an odd number. (1 +) is certainly not expecting a NULL as its argument type is Int. I can tell it, "Just die if that happens": 1 + (fromMaybe (error "couln't find odd number") $ findFirstOdd [2,3]) or I can tell it to work on the inside value if it's there, returning Just (1 + someOddNumber) if it's there or Nothing if it's not: (1 +) <$> findFirstOdd [2,3] Conversely, if a function says it returns an Int: addOne :: Int -> Int That means it returns an Int, guaranteed. That's never going to be some null value. It's not something you'd ever have to consider. Kind of wish all languages were like this. Nulls are probably the cause of most unexpected exceptions and it could be something that could always be caught without even running the program.
- eckza 8y agoYou’re looking for a nice little functional frontend web language called Elm.
- deleted 8y ago[deleted]
- repolfx 8y agoThat's what Kotlin does. The only place NPEs can creep in with Kotlin code is: a) Interop with Java APIs (Kotlin doesn't force you to check every return type from a non-Kotlin call) b) If you use !! to cast away nullness. Good Kotlin style can almost always avoid such cases.
- oftenwrong 8y agoOptional is Java's impoverished version of Maybe: https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/util/Optional.html https://docs.oracle.com/en/java/javase/12/docs/api/java.base... Of course, an Optional reference can still be null because it's still Java. There are also other implementations of Maybe-like types, and implementations of Either-like types, etc in the Java ecosystem.
- portal_narlish 8y agoJEP draft: Remove NullPointerException from language
- opportune 8y agoThis is awesome! I ran into this exact issue yesterday evening trying to debug a NPE on foo.bar().baz().hello() IMO overhead should not even be a consideration. It doesn't make sense to sacrifice detailed reporting just so someone can repeatedly handle NPEs as part of their application's logic. I can't imagine a situation in which I would look at code that throws enough NPEs for overhead to be a concern and say "yes this is well designed code"
- danra 8y agoI hope I'm not the only one who read the title as adding some helpful text to the exception for n00bs, which explains about the very concept of null.
- Myrmornis 8y ago> Given the bytecode, it is not obvious which previous instruction pushed the null value. To find out about this, a simple data flow analysis is run on the bytecodes. This is a petty nit on what sounds like some great work but please do not use the word "simple" in technical contexts like this. Having you assert that it is simple does not make it easier for anyone to understand, and it is really quite irritating. I don't even know what "data flow analysis" is and I've been involved with computer programming and data analysis for 15 years.
- cesarb 8y ago> I don't even know what "data flow analysis" is and I've been involved with computer programming and data analysis for 15 years. You probably haven't been involved with compiler development in these 15 years; data flow analysis is one of the techniques used by optimizing compilers to reason about the code. Given the context (not only there is a compiler converting Java source code to Java bytecode, but also the Java Virtual Machine acts as a "just-in-time" compiler from the Java bytecode to machine code), everyone involved most probably already know what "data flow analysis" is. And by "simple" the author most probably means that a basic data flow analysis, with no extra bells and whistles, would be enough for the described purpose.
- IloveHN84 8y agoJava is pretty weird land. It's 2019 and there's still this issue with Nullpointer Exception and the other big limitation is that you cannot create a new instance of a generic type in a generic function, making programs dynamic, like in C++. Funny, because the whole JVM is based on C++