Examples of errors detected by the V6006 diagnostic

V6006. The object was created but it is not being used. The 'throw' keyword could be missing.


Elasticsearch

V6006 The object was created but it is not being used. The 'throw' keyword could be missing. JdbcConnection.java(88)


@Override
public void setAutoCommit(boolean autoCommit) throws SQLException {
    checkOpen();
    if (!autoCommit) {
        new SQLFeatureNotSupportedException(....);
    }
}

Ghidra

V6006 The object was created but it is not being used. The 'throw' keyword could be missing: 'new MemoryAccessException("Cyclic Access");'. BitMappedSubMemoryBlock.java(99)


public void putByte(long offsetInMemBlock, byte b)
throws MemoryAccessException, IOException {
  long offsetInSubBlock = offsetInMemBlock - subBlockOffset;
  try {
    if (ioPending) {
      new MemoryAccessException("Cyclic Access"); // <=
    }
    ioPending = true;
    doPutByte(mappedAddress.addNoWrap(offsetInSubBlock / 8),
              (int) (offsetInSubBlock % 8), b);
  }
  catch (AddressOverflowException e) {
    new MemoryAccessException("No memory at address"); // <=
  }
  finally {
    ioPending = false;
  }
}

Similar errors can be found in some other places:

  • V6006 The object was created but it is not being used. The 'throw' keyword could be missing: 'new MemoryAccessException("Cyclic Access");'. BitMappedSubMemoryBlock.java(77)
  • V6006 The object was created but it is not being used. The 'throw' keyword could be missing: 'new MemoryAccessException("No memory at address");'. BitMappedSubMemoryBlock.java(106)
  • V6006 The object was created but it is not being used. The 'throw' keyword could be missing: 'new MemoryAccessException("Cyclic Access");'. BitMappedSubMemoryBlock.java(122)
  • And 4 additional diagnostic messages.


Bugs Found

Checked Projects
412
Collected Errors
14 132
This website uses cookies and other technology to provide you a more personalized experience. By continuing the view of our web-pages you accept the terms of using these files. If you don't want your personal data to be processed, please, leave this site. Learn More →
Accept