Skip to content

NPE in RepositoryUrlPanel Line 88 #565

Description

@gitblit

Originally reported on Google Code with ID 269

What steps will reproduce the problem?

Trying to display the summary page of a repo causes a NPE. (All other pages for the
repo worked.)
Checking the code (https://code.google.com/p/gitblit/source/browse/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java?name=v1.3.0)showed
the obvious error.

primaryUrl = repositoryUrls.size() == 0 ? null : repositoryUrls.get(0);
LINE 88: NPE =>> boolean canClone = ((primaryUrl.permission == null) || primaryUrl.permission.atLeast(AccessPermission.CLONE));

primaryUrl will be null if repositoryUrls.size() == 0 
accessing primaryUrl.permission will throw a NPE.


Reported by RAlfoeldi on 2013-07-15 08:26:57

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions