Skip to content
Snippets Groups Projects
  1. Feb 22, 2018
    • Philip S Doctor's avatar
      When Java raises a CharacterCodingException, the catch block rethrows this... · b24c0b07
      Philip S Doctor authored
      When Java raises a CharacterCodingException, the catch block rethrows this exception as a java.lang.Error.  Per the docs https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html an Error is a serious problem that applications should not attempt to catch such as ThreadDeath.  In this case, it is reasonable for a consumer to try to catch this error as it likely indicates a problem with the underlying data. (#4630)
      
      As Error does not inherit from Exception, a generic `catch(Exception ex)` will not catch this error.
      
      A simple change from `Error` to `Exception` is not sufficient as an `Exception` is checked by the compiler, so in order to keep this issue unchecked, I am proposing raising a `RuntimeException` which is not checked, but is still a subclass of `Exception`.
      
      The only possible breaking change would be if a consumer was explicitly catching `Error` already for this library.
      
      https://github.com/google/flatbuffers/issues/4629
      b24c0b07
  2. Jul 13, 2017
  3. Aug 26, 2016
  4. Aug 22, 2016
  5. Aug 14, 2016
  6. Aug 03, 2016
  7. Jul 05, 2016
  8. Jun 07, 2016
    • Romain Gilles's avatar
      Create a maven like project structure for java development. Make it OSGi... · 9875b0e0
      Romain Gilles authored
      Create a maven like project structure for java development. Make it OSGi compliant. Generate the flatbuffers code for testing (example).
      
      Java developer are mostly comfortable with maven project structure. One one the main concept behind maven is convention. If you follow the maven project convention then your development team will get more effective as they now this project structure and can easily find the production code versus the test code.
       In this pull request I have structured the java project around 2 main parts:
        * the `flatbuffers` project. This project is the api / lib project and contains the test code structure + an example of code generation for testing. This avoid to commit generated code. Pre-configure JUnit for test driven development and make this project OSGi compliant.
        * the `jmh` project. This project aims to provide a placeholder for micro-benchmarking. JMH is a 'de facto' standard for micro benchmarking you can find more details here: http://openjdk.java.net/projects/code-tools/jmh/
      
      For now I didn't move the JavaTest class but it could be a next step with a migration to the JUnit framework.
      The only impacts are the move of the class and the project structure => no code change.
      9875b0e0
  9. Apr 19, 2016
    • pjulien's avatar
      size the allocation to the required bytes · 9fb87f81
      pjulien authored
      9fb87f81
    • pjulien's avatar
      fix file permission · b0146b3d
      pjulien authored
      b0146b3d
    • pjulien's avatar
      Fix for #3853 · 286587d1
      pjulien authored
      Removes the following allocations:
      - ``CharsetDecoder`` is reused between calls
      - ``CharBuffer#wrap`` removed in favor of heap
        based char buffer that is reused
      - Temporary ``char[]``, an intermediate copy inside ``StringCoding``
      - Another ``char[]``, this is needed because ``StringCoding`` uses
        a ``CharBuffer`` internally but returns a ``char[]``.  Extra
        characters need to be trimmed so this means yet another allocation
      - Yet another ``char[]`` directly from ``__string`` for non-heap
        based buffers
      
      Removes the following copies
      - No copy is performed to trim the allocation since a ``CharBuffer``
        is used directly
      - For non-heap based byte buffers, removes the copy that was
        previously done in the __string function
      
      This does need to get the TLS entry which implies at least some
      contention on the thread object table and a fence.
      286587d1
  10. Apr 17, 2016
  11. Jan 19, 2016
    • Mark Klara's avatar
      Revamping the FlatBuffers docs. · 69a31b80
      Mark Klara authored
      Adding an API reference for the supported languages.
      
      General docs cleanup, including a new `tutorial` section that
      supports all of the supported languages.
      
      Added samples for each supported language to mirror the new
      tutorial page.
      
      Cleaned up all the links by making them `@ref` style links,
      instead of referencing the names of the generated `.html` files.
      
      Removed all generated files that were unnecessarily committed.
      
      Also fixed the C# tests (two were failing due to a missing file).
      
      Bug: b/25801305
      
      Tested: Tested all samples on Ubuntu, Mac, and Android. Docs were
      generated using doxygen and viewed on Chrome.
      
      Change-Id: I2acaba6e332a15ae2deff5f26a4a25da7bd2c954
      69a31b80
  12. May 20, 2015
  13. May 09, 2015
    • pjulien's avatar
      Issue #188 · d322eec3
      pjulien authored
      When accessing the array directly of a byte buffer, need to offset
      by ``arrayOffset``
      d322eec3
  14. Feb 04, 2015
    • pjulien's avatar
      Issue #136 · 4d3db992
      pjulien authored
      The satellite data of the ``ByteBuffer`` cannot be modified in
      any way and stay thread safe in the presence of concurrent readers.
      
      This implementation is simple and does introduce an allocation, however
      without it multiple readers will quickly and continuously encounter
      ``IndexOutOfBoundsException`` exceptions.
      
      An alternative, but possibly more controversial, implementation would
      be to use ``Unsafe``.  Using ``Unsafe``, it's possible to do an
      array copy with a provided buffer index.
      
      Change-Id: I851d4034e753b3be2931ee2249ec2c82dde43135
      4d3db992
  15. Jan 16, 2015
  16. Sep 16, 2014
  17. Sep 15, 2014
  18. Sep 05, 2014
  19. Sep 03, 2014
  20. Aug 12, 2014
  21. Jun 10, 2014
Loading