{"record":{"id":"0f4ee34b479517f5","repo":"pentaho/pentaho-kettle","slug":"invalid-zoom-value","errorCode":null,"errorMessage":"Invalid zoom value","messagePattern":"Invalid zoom value","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java","lineNumber":1900,"sourceCode":"    }\n  }\n\n  /**\n   * Allows for magnifying to any percentage entered by the user...\n   */\n  private void readMagnification() {\n    float previousMagnification = magnification;\n    String possibleText = zoomLabel.getText();\n    possibleText = possibleText.replace( \"%\", \"\" );\n\n    float possibleFloatMagnification;\n    try {\n      possibleFloatMagnification = Float.parseFloat( possibleText ) / 100;\n      magnification = possibleFloatMagnification;\n      if ( magnification < MIN_ZOOM || magnification > MAX_ZOOM ) {\n        magnification = previousMagnification;\n        log.logError( \"Invalid zoom value: \" + zoomLabel.getText() );\n        throw new IllegalArgumentException( );\n      }\n      if ( zoomLabel.getText().indexOf( '%' ) < 0 ) {\n        zoomLabel.setText( zoomLabel.getText().concat( \"%\" ) );\n      }\n    } catch ( Exception e ) {\n      modalMessageDialog( getString( \"TransGraph.Dialog.InvalidZoomMeasurement.Title\" ),\n        getString( \"TransGraph.Dialog.InvalidZoomMeasurement.Message\", String.valueOf( (int) ( MIN_ZOOM * 100 ) ), String.valueOf( (int) MAX_ZOOM * 100 ) ),\n        SWT.YES | SWT.ICON_ERROR );\n    }\n    redraw();\n  }\n\n  protected void hideToolTips() {\n    toolTip.hide();\n    helpTip.hide();\n    toolTip.setHideDelay( TOOLTIP_HIDE_DELAY_SHORT );\n  }\n","sourceCodeStart":1882,"sourceCodeEnd":1918,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/spoon/trans/TransGraph.java#L1882-L1918","documentation":"TransGraph's zoom label handler parses the entered text as a percentage (/100) into a magnification. On a parse failure or an out-of-range magnification (outside MIN_ZOOM..MAX_ZOOM) it restores the previous magnification, logs 'Invalid zoom value', throws IllegalArgumentException internally, and the catch block shows the 'InvalidZoomMeasurement' dialog.","triggerScenarios":"Typing a non-numeric string or a zoom value whose /100 result is below MIN_ZOOM or above MAX_ZOOM into the TransGraph zoom label and confirming it.","commonSituations":"Typos like '25o%' or '1.5.0'; entering '1000%' when the max zoom is lower; pasting values copied from other tools with different zoom semantics.","solutions":["Type a plain numeric percentage within the supported zoom range (e.g. '150%').","Remove any non-numeric characters or duplicate decimal points.","Pick a value from the zoom preset drop-down rather than free text."],"exampleFix":"// before\nString possibleText = \"abc\"; // unparsable\n// after\nString possibleText = \"150\"; // 1.5x magnification, in range","handlingStrategy":"validation","validationCode":"float m;\ntry { m = Float.parseFloat( text ) / 100; } catch ( NumberFormatException e ) { m = -1; }\nif ( m < MIN_ZOOM || m > MAX_ZOOM ) { /* reject and restore previousMagnification */ }","typeGuard":null,"tryCatchPattern":"try {\n  applyZoom( possibleText );\n} catch ( Exception e ) {\n  magnification = previousMagnification;\n  modalMessageDialog( getString( \"TransGraph.Dialog.InvalidZoomMeasurement.Title\" ),\n                      getString( \"TransGraph.Dialog.InvalidZoomMeasurement.Message\" ) );\n}","preventionTips":["Enter numeric zoom values without letters or duplicate decimal points.","Keep zoom within the supported range (e.g. 10%..400%).","Use preset zoom levels instead of typing arbitrary magnifications."],"tags":["ui","zoom","transformation-graph","invalid-input"],"backgroundTag":"invalid-argument-value","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"}