Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,23 @@ HttpResponse res = h.send(req); // ! Invalid HTTP method: PATCH

[There is a workaround](https://salesforce.stackexchange.com/questions/57215/how-can-i-make-a-patch-http-callout-from-apex), but only supported by some servers.

### Integers cannot be assigned the minimum Integer value

Integers have a minimum possible value of -2147483648, but this value cannot be directly assigned to an Integer.

```apex
Integer totallyLegalNumber = -2147483648; // ! Illegal integer
```

The miscarriage of justice above can be avoided with the following workaround that clearly demonstrates the legality of the number:

```apex
Integer totallyLegalNumber = -2147483647;
totallyLegalNumber--;
System.debug(totallyLegalNumber); // > -2147483648
```
Source: [Mehdi Maujood](https://www.apexsandbox.io/problem/68)

## 🔧 Since Fixed

Thankfully, these WTF's have since been fixed by Salesforce. We'll keep them documented for historical purposes (and entertainment).
Expand Down