Skip to content

Missing null check in getOrientation() method can cause NPE #139

@coderabbitai

Description

@coderabbitai

Description

The getOrientation() method in TabbedDemo.java does not check if currentLayout is null before calling currentLayout.getOrientation(), which can result in a NullPointerException when the method is called before any content is loaded.

Location

File: src/main/java/com/flowingcode/vaadin/addons/demo/TabbedDemo.java
Method: getOrientation() (around lines 346-348)

Context

Other similar methods like toggleSourcePosition() and setOrientation() include null checks for currentLayout, but getOrientation() does not follow this pattern.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions