question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing UnsignedInts.checkedCast

See original GitHub issue

Unless I’m missing something, the method UnsignedInts.checkedCast(long val) seems to be missing. This method is available for all of the smaller types (e.g., bytes) in both signed and unsigned variants. It is also available in Ints for signed values.

There doesn’t seem to be a particular reason for the omission, since there doesn’t seem to be any particular implementation difficulty and it exists in almost all the other “unsigned” variants.

This method is needed and useful for the same reason as all the other checkedCast variants.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ronshapirocommented, Sep 14, 2017

Added in 6fff60802ed6d8157b6178842ff9d164aa0fe928

0reactions
lowassercommented, Dec 9, 2016

Added this to the internal API review queue; will keep this updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diff - b8a8cc1^! - platform/external/v8 - Git at Google
+ + Fix missing smi check in inlined indexOf/lastIndexOf (Chromium issue + ... have to check // that the handle isn't empty before...
Read more >
~/cplus/syntax.txt.html - NYLXS
implicit conversion in arithmetic operations in cases where sign is lost (conversions from unsigned ints to long for example), unless the value
Read more >
mozilla-central: changeset 194083 ...
... has ended. missing_conversation_info=Missing conversation information. network_disconnected=The ... The size of the reserved stack (in unsigned ints).
Read more >
Index (Weld Implementation 2.2.12.Final API) - AppDoc
checkedCast (long) - Static method in class com.google.common.primitives. ... Attempts to extract a name of a missing class loader dependency from an ...
Read more >
google guava 入门教程_菜鸟腾飞的博客
int和long的无符号形式方法在UnsignedInts和UnsignedLongs类中,但由于这两个类型的大 ... prim checkedCast(long value) ... MAC missing xcrun at: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found