Fix build failure due to Java 7 specific statement usage
6ecab77d02
was cherry-picked from
master and causes a build failure because it uses a multi-catch
statement that is not supported in source version 1.6. On master
the Java source version is 1.7 which is why it builds there.
Change-Id: Ia43c2c6b9068553635a5ddd5bc4129ddf5c1fd35
This commit is contained in:
@@ -63,11 +63,15 @@ public class GetHead implements RestReadView<ProjectResource> {
|
||||
return head.getObjectId().name();
|
||||
}
|
||||
throw new AuthException();
|
||||
} catch (MissingObjectException | IncorrectObjectTypeException e) {
|
||||
} catch (MissingObjectException e) {
|
||||
if (rsrc.getControl().isOwner()) {
|
||||
return head.getObjectId().name();
|
||||
}
|
||||
throw new AuthException();
|
||||
} catch (IncorrectObjectTypeException e) {
|
||||
if (rsrc.getControl().isOwner()) {
|
||||
return head.getObjectId().name();
|
||||
}
|
||||
} finally {
|
||||
rw.release();
|
||||
}
|
||||
|
Reference in New Issue
Block a user