Changes between Version 1 and Version 2 of Ticket #16995, comment 11


Ignore:
Timestamp:
2018-11-17T07:48:17+01:00 (7 years ago)
Author:
cmuelle8

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16995, comment 11

    v1 v2  
    22
    33EDIT:  [https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html Oracle says] that from Java 8 {{{int}}} can be used like {{{uint}}}, but you have to be careful to use static methods like Integer.compareUnsigned(), Integer.divideUnsigned() to treat the variable with.  I have not reviewed the JOSM code enough to tell whether these are already used / are usable to achieve "2038-safeness".
     4
     5EDIT2:  Doing a quick search in josm code yields no results, so I assume the current {{{int timestamp}}} at the core of AbstractPrimitive is not worked with employing the [https://web.archive.org/web/20181117064702/https://www.baeldung.com/java-unsigned-arithmetic Unsigned Integer API] available in Java8 and higher.
     6{{{
     7find workspace/JOSM/ -type f -name "*.java" -exec grep -H compareUnsigned {} \;
     8find workspace/JOSM/ -type f -name "*.java" -exec grep -H parseUnsigned {} \;
     9find workspace/JOSM/ -type f -name "*.java" -exec grep -H toUnsigned {} \;
     10}}}