Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 716002

Summary: app-portage/java-ebuilder-0.4.1: Exception in thread "main" java.lang.NullPointerException
Product: Gentoo Linux Reporter: Fabio Rossi <rossi.f>
Component: Current packagesAssignee: Benda Xu <heroxbd>
Status: CONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Fabio Rossi 2020-04-03 08:45:16 UTC
When running the tool as normal user, I get the following exception:

$ java-ebuilder -c
Parsing portage tree @ /usr/portage ...
Exception in thread "main" java.lang.NullPointerException

This is due to the fact the array passed to the for loop is not empty list but a NULL pointer, on my system it happens when trying to inspect /usr/portage/packages which has the following mode bits: 

drwx------ 106 portage portage 4096  3 apr 10.08 /usr/portage/packages/

If the user is thought to be run as root the tool should check for the user id otherwise the array iteration should be fixed