Bug 472512 - Repository.create occasionally throws UnsupportedOperationException
Summary: Repository.create occasionally throws UnsupportedOperationException
Status: NEW
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-13 09:10 EDT by Ondrej Vrabec CLA
Modified: 2015-07-13 09:12 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec CLA 2015-07-13 09:10:16 EDT
This may be related to bug #429947 -  FS_Win32_Java7#detectSymlinkSupport should catch UnsupportedOperationException

We have the following exception filed to NetBeans IDE:
java.lang.UnsupportedOperationException: Symbolic links not supported on this operating system
	at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink(WindowsFileSystemProvider.java:529)
	at java.nio.file.Files.createSymbolicLink(Files.java:1043)
	at org.eclipse.jgit.util.FileUtil.createSymLink(FileUtil.java:96)
	at org.eclipse.jgit.util.FS_Win32_Java7Cygwin.createSymLink(FS_Win32_Java7Cygwin.java:128)
	at org.eclipse.jgit.internal.storage.file.FileRepository.create(FileRepository.java:309)
	at org.eclipse.jgit.lib.Repository.create(Repository.java:169)

Can FS_Win32_Java7Cygwin.createSymLink catch UnsupportedOperationException and throw IOException instead (Files.createSymbolicLink may throw an UOE according to the javadoc)? Or possibly Repository.create could catch the exception besides already caught IOException for the createSymLink call?
Comment 1 Ondrej Vrabec CLA 2015-07-13 09:12:50 EDT
Just for the record, our reporter uses Windows XP, so i expect this does not happen in Cygwin on Windows Vista+.

https://netbeans.org/bugzilla/show_bug.cgi?id=252168