{"record":{"id":"48c1ce4414b560bf","repo":"pentaho/pentaho-kettle","slug":"it-s-not-possible-to-convert-from-an-internet-address-to-a","errorCode":null,"errorMessage":": it's not possible to convert from an Internet Address to a Boolean","messagePattern":": it's not possible to convert from an Internet Address to a Boolean","errorType":"exception","errorClass":"KettleValueException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java","lineNumber":202,"sourceCode":"  @Override\n  public BigDecimal getBigNumber( Object object ) throws KettleValueException {\n    InetAddress address = getInternetAddress( object );\n    if ( null == address ) {\n      return null;\n    }\n    BigInteger bi = BigInteger.ZERO;\n    byte[] addr = address.getAddress();\n\n    for ( byte aByte : addr ) {\n      bi = bi.shiftLeft( 8 ).add( BigInteger.valueOf( aByte & 0xFF ) );\n    }\n\n    return new BigDecimal( bi );\n  }\n\n  @Override\n  public Boolean getBoolean( Object object ) throws KettleValueException {\n    throw new KettleValueException( toStringMeta()\n      + \": it's not possible to convert from an Internet Address to a Boolean\" );\n  }\n\n  @Override\n  public String getString( Object object ) throws KettleValueException {\n    return convertInternetAddressToString( getInternetAddress( object ) );\n  }\n\n  @Override\n  public byte[] getBinaryString( Object object ) throws KettleValueException {\n    if ( isStorageBinaryString() && identicalFormat ) {\n      return (byte[]) object; // shortcut it directly for better performance.\n    }\n    if ( object == null ) {\n      return null;\n    }\n    switch ( storageType ) {\n      case STORAGE_TYPE_NORMAL:","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/row/value/ValueMetaInternetAddress.java#L184-L220","documentation":"ValueMetaInternetAddress.getBoolean() is intentionally unsupported: there is no meaningful boolean interpretation of an IP address. The method unconditionally throws KettleValueException for any non-null conversion attempt.","triggerScenarios":"Any call to getBoolean() on an Internet Address value meta — e.g., a step or expression converting the field to Boolean, or a boolean comparison against the field.","commonSituations":"Mapping an IP field into a boolean output field in a transformation; copy/pasted field-type mappings after changing a field's type; legacy transformations where the field used to be a String/Number and is now Internet Address.","solutions":["Change the target/output field type so it no longer requests Boolean from this field","Convert via getString() and apply explicit business logic (e.g., compare against a known address or 'empty' check) if a boolean was intended","Catch KettleValueException and supply a defined default (null/false) where boolean output is unavoidable"],"exampleFix":"// before\nBoolean b = inetValueMeta.getBoolean(rowData[i]);\n// after\nString s = inetValueMeta.getString(rowData[i]);\nBoolean b = (s == null) ? null : !s.isEmpty(); // explicit rule","handlingStrategy":"validation","validationCode":"// never call getBoolean on InternetAddress; derive boolean from string explicitly\nBoolean b = (s == null) ? null : !s.isEmpty();","typeGuard":"if (meta instanceof ValueMetaInternetAddress) { /* getBoolean() will always throw */ }","tryCatchPattern":"try { b = meta.getBoolean(v); } catch (KettleValueException e) { b = null; }","preventionTips":["Never target Boolean fields from Internet Address fields","Check meta type before boolean conversion","Use explicit business rules on getString() instead"],"tags":["unsupported-conversion","boolean","type-conversion","kettle"],"backgroundTag":"unsupported-operation","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}