runtimeverification / javamop

Runtime verification system for Java, using AspectJ for instrumentation.
http://fsl.cs.illinois.edu/javamop
MIT License
45 stars 37 forks source link

Improvement of property ByteArrayOutputStream_FlushBeforeRetrieve #237

Open emopers opened 8 years ago

emopers commented 8 years ago

Hi, we have an improvement to this property in order to reduce the false positives it could trigger. This problem was found when we submitted the bug reports for this project. The developer rejected our PR as bytes here was actually flushed after it's been casted into Flushable. This is because JavaMOP only catches OutputStream object, while missing on the supertype Flushable of OutputStream. We'd suggest to improve this property by also considering the supertype of the monitored object to avoid false positives triggered by type casting.