diff --git a/lib/buffer.js b/lib/buffer.js index 42862c02da98d8..73e3bc44209ee4 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -140,11 +140,9 @@ 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 Buffer.alloc(), ' + - 'Buffer.allocUnsafe(), or Buffer.from() construction ' + - 'methods instead.'; +const bufferWarning = 'Buffer() is deprecated due to security and usability ' + + 'issues. Please use the Buffer.alloc(), ' + + 'Buffer.allocUnsafe(), or Buffer.from() methods instead.'; function showFlaggedDeprecation() { if (bufferWarn) { diff --git a/test/parallel/test-buffer-pending-deprecation.js b/test/parallel/test-buffer-pending-deprecation.js index ba9f1b7bd7b592..1bb7b0bee19f9b 100644 --- a/test/parallel/test-buffer-pending-deprecation.js +++ b/test/parallel/test-buffer-pending-deprecation.js @@ -3,11 +3,9 @@ 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 Buffer.alloc(), ' + - 'Buffer.allocUnsafe(), or Buffer.from() construction ' + - 'methods instead.'; +const bufferWarning = 'Buffer() is deprecated due to security and usability ' + + 'issues. Please use the Buffer.alloc(), ' + + 'Buffer.allocUnsafe(), or Buffer.from() methods instead.'; common.expectWarning('DeprecationWarning', bufferWarning, 'DEP0005');