Skip to content

Commit

Permalink
buffer: remove "new" from deprecation message
Browse files Browse the repository at this point in the history
This change removes "new" as a description for `Buffer` construction
methods. They are arguably not "new" anymore and they certainly won't be
"new" anymore at some point.

PR-URL: #19687
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Nikolai Vavilov <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and targos committed Apr 2, 2018
1 parent b80d169 commit 54b84f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function alignPool() {
var bufferWarn = true;
const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' +
'recommended for use due to security and usability ' +
'concerns. Please use the new Buffer.alloc(), ' +
'concerns. Please use the Buffer.alloc(), ' +
'Buffer.allocUnsafe(), or Buffer.from() construction ' +
'methods instead.';

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-buffer-pending-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const common = require('../common');

const bufferWarning = 'The Buffer() and new Buffer() constructors are not ' +
'recommended for use due to security and usability ' +
'concerns. Please use the new Buffer.alloc(), ' +
'concerns. Please use the Buffer.alloc(), ' +
'Buffer.allocUnsafe(), or Buffer.from() construction ' +
'methods instead.';

Expand Down

0 comments on commit 54b84f3

Please sign in to comment.