Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in RepositoryUrlPanel Line 88 #565

Closed
gitblit opened this issue Aug 12, 2015 · 5 comments
Closed

NPE in RepositoryUrlPanel Line 88 #565

gitblit opened this issue Aug 12, 2015 · 5 comments

Comments

@gitblit
Copy link
Owner

@gitblit gitblit commented Aug 12, 2015

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

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Setting 

git.enableGitServlet = false

(probably) causes no urls and the above NPE.

Setting git.enableGitServlet = true "solves" the problem.

As I'm using gitblit only as a git "viewer" this isn't really an option.

Reported by RAlfoeldi on 2013-07-15 08:50:39

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Set at least one url in web.otherUrls

Reported by James.Moger on 2013-07-15 11:53:56

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Fixed on master

Reported by James.Moger on 2013-07-15 12:10:33

  • Status changed: Queued
  • Labels added: Milestone-1.3.1

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Fix or change deployed in 1.3.1

Reported by James.Moger on 2013-07-24 19:56:32

@gitblit
Copy link
Owner Author

@gitblit gitblit commented Aug 12, 2015

Reported by James.Moger on 2013-07-24 19:57:04

  • Status changed: Fixed

@gitblit gitblit closed this as completed Aug 12, 2015
@flaix flaix added this to the 1.3.1 milestone Dec 13, 2016
@flaix flaix added this to the 1.3.1 milestone Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants