summaryrefslogtreecommitdiffstats
path: root/src/java
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 865: Safari >= 6.1 [OSX]: May employ xattr on 'com.apple.quarantine' ↵Sven Gothel2013-10-233-29/+98
| | | | | | | | | on 'PluginProcess.app' - IOUtil.getTempDir(..): Don't test executable caps on OSX for java_io_tmpdir - JarUtil.extract(..): Issue native fixNativeLibAttribs(..) on OSX for native library files, i.e. remove xattr 'com.apple.quarantine'
* Fix Bug 857: GlueGen produces erroneous file URI on Windows, which breaks ↵Sven Gothel2013-10-182-20/+115
| | | | | | | | | | | | | | | | | | | | | | | | | Netbeans's JarURLStreamHandler - 'URL IOUtil.toURL(URI)' - Needs to encode the file-path portion on Windows(*) if exists. The file-path here shall only be encoded as follows: - backslash -> slash - ensure starting with slash (*) We perform above action for all OS, if 'false == File.separator.equals("/")' - Added high verbosity in DEBUG mode to easy debugging for future cases .. - Cleanup URI/URL unit tests, i.e. split URLCompositionTest into: - TestIOUtilURICompose - TestIOUtilURIHandling (Now covers Bug 857 as well) - TestUrisWithAssetHandler - TestURIQueryProps Tested all unit tests manually on GNU/Linux and Windows w/ JRE 7u45
* gluegen: add all missing @Override annotationsHarvey Harrison2013-10-1751-0/+182
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-17136-2508/+2508
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* ArrayHashSet: Use final local vars if applicableSven Gothel2013-10-171-7/+7
|
* ArrayHashSet: Add @OverrideSven Gothel2013-10-171-0/+27
|
* Merge pull request #16 from forticulous/buffers-spellingSven Gothel2013-10-121-12/+12
|\ | | | | Buffers.java - spelling (lenght -> length) - thx
| * Buffers.java - spellingMatthew Gibson2013-08-261-12/+12
| |
* | Bug 820: Escape SPACE in filenames for URI ctor, use decoded URI components ↵Sven Gothel2013-10-072-13/+36
| | | | | | | | | | | | | | | | | | | | when compiling new URI. Add IOUtil: - String encodeToURI(String) - String decodeFromURI(String) Both only handle escaping of SPACE only. Determine whether other chars need to be treated.
* | VersionUtil.getPlatformInfo: include 'getOSVersionNumber()' beside it's ↵Sven Gothel2013-10-031-1/+1
| | | | | | | | string representation.
* | PropertyAccess: Add trusted properties sun.java2d.opengl, ↵Sven Gothel2013-10-021-1/+8
| | | | | | | | sun.java2d.noddraw, sun.java2d.d3d, sun.awt.noerasebackground
* | IOUtil/JarUtil: Add more detail debug information for URI transformation; ↵Sven Gothel2013-10-012-18/+41
| | | | | | | | IOUtil.toURL(..) handle exception at 'new File(uri)'
* | JNILibLoaderBase.addNativeJarLibsImpl(..): Cleanup debug message creation.Sven Gothel2013-10-011-13/+10
| |
* | Bug 845: Fix JNILibLoaderBase.addNativeJarLibsImpl(..) fat-jar case.Sven Gothel2013-10-012-16/+35
| | | | | | | | | | | | | | | | | | | | | | Always use the jar-basename when calling TempJarCache.addNativeLibs(..), otherwise it is mapped and loaded multiple times leading to different native libraries. Simplify addNativeJarLibsImpl(..) argument semantics by passing complete jarBasename and nativeJarBasename (w/ suffix). Added manual test scripts validating [gluegen + jogl] usage with multi (Bug 843) and fat (Bug 845) jar configurations.
* | Bug 845: Add support for one big-fat jar file [java classes plus all native ↵Sven Gothel2013-10-013-31/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'os.and.arch' libraries] JNILibLoaderBase.addNativeJarLibsImpl(..): If the modules's jar file contains the folder 'natives/<os.and.arch>/' we assume a big-fat jar and attempt to load all native libraries from the same. The test for above folder is performed via the class ClassLoader's getResource(..) and is considered inexpensive. If the folder exists and native libraries could be loaded, the method returns successfull. Otherwise, the 'slim' jar file is attempted to be loaded, even if such folder exist.
* | Fix Bug 844: Cannot ctor URI w/ scheme alone, use string-based concatenation ↵Sven Gothel2013-10-013-6/+42
| | | | | | | | native URI root and jar file.
* | Fix Bug 843: Remove Platform's requirement and use of ↵Sven Gothel2013-10-014-92/+25
| | | | | | | | | | | | | | | | | | TempJarCache.bootstrapNativeLib(), allowing versatile use of 1st native jar file (big-java-jar w/ big-native-jar) The remaining Platform dependency existed in IOUtil.copyStream2Stream(..), used by JarUtil.extract(..), i.e. the MachineDescription's PAGE_SIZE. Solved by using a const buffer size of 4096 bytes.
* | Bug 816: Add Platform.JAVA_VERSION_UPDATE - Allowing to determin whether JVM ↵Sven Gothel2013-09-222-1/+16
| | | | | | | | is >= 1.7.0u40
* | gluegen: loop over entries in HashMap directly rather than looping over keysHarvey Harrison2013-09-041-8/+8
| | | | | | | | | | | | | | | | | | This saves repeated lookups of the value mapped to each key by just looping over the entries directly. Also remove the URIException clause as this method never can throw that exception. Signed-off-by: Harvey Harrison <[email protected]>
* | gluegen: remove trailing whitespace from URIQueryPropsHarvey Harrison2013-09-041-13/+13
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* | Fix Bug 810: Moved Julien Gouesse's fix to GlueGen to solve JOGL's optional ↵Sven Gothel2013-09-021-14/+60
| | | | | | | | module dependencies, added more API doc.
* | URIQueryProps: Custumize query separator, allowing user to favor ';' over '&'Sven Gothel2013-08-301-6/+21
| |
* | Add URIQueryProps: Simple tool to process URI queries as propertiesSven Gothel2013-08-281-0/+122
|/
* DynamicLibraryBundle: Remove unused importsSven Gothel2013-08-261-3/+0
|
* *Ringbuffer: Remove Ringbuffer<T>.AllocEmptyArray interface to favor a more ↵Sven Gothel2013-08-243-144/+189
| | | | | | | | | | | | | | | simple approach; Split 'grow' into 'growEmpty' and 'growFull' - java.lang.reflect.Array can instantiate an array w/ a given array-type and length - array-type is Class<? extends T[]> - We either deduct the array-type via array.getClass(), or pass it (ctor for empty Ringbuffer). - Split 'growBuffer(T[] newElements, int amount, ..)' into: - 'growEmptyBuffer(T[] newElements)' - 'growFullBuffer(int amount)' Allowing a more clean API w/ simpler semantics.
* Add Ringbuffer interface an 2 implementations, synchronized (locking) ↵Sven Gothel2013-08-223-0/+996
| | | | | | | | | | | | | | | | | | | | | | | | SyncedRingbuffer and lock-free LFRingbuffer. SyncedRingbuffer is moved from JOGL to GlueGen, and generalized w/ common interface Ringbuffer to allow testing diff. implementations. - Added Ringbuffer.AllocEmptyArray factory interface, allowing to pass a constructor to construct the generic array. - Added functionality is growBuffer(..), allowing to either grow a full or empty buffer, using Ringbuffer.AllocEmptyArray. - Removed explicit 'clearRef' at get*(..), always clear the taken reference for better interface generalization. - Added LFRingbuffer, exposing lock-free get*(..) and put*(..) methods using the 'Always Keep One Slot Open' pattern using the read/write index as barriers only. - Ctor's copy an optional passed user array into the internal array, utilizing Ringbuffer.AllocEmptyArray. - Added unit tests.
* Platform: Add accurate currentTimeMillis() and currentTimeMicros() native ↵Sven Gothel2013-08-151-0/+22
| | | | methods, based on 'gettimeofday(..)'
* Remove _default_ workaround for Bug 566. Workaround shall no more be ↵v2.0.2Sven Gothel2013-07-201-7/+1
| | | | | | | required - and it deadlocks AWT/NEWT jogl/joal lib loading. Introduced w/ commits 1c03dfd6d1939a46018583419956e350e531f4fe and e9e61421ef6009e6788998c471d1d3d30aaefea6
* Remedy for Bug 782: Issue Debug.initSingleton() or Debug.debug(..) before ↵Sven Gothel2013-07-174-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | calling 'PropertyAccess.isPropertyDefined(propName, default)' through Debug class. Calling 'Debug.isPropertyDefined(propName, default)' may be 'optimized' to 'PropertyAccess.isPropertyDefined(propName, default)', which would skip the modules Debug's class initialization. Iff that happens, an AccessControlException may happen, due to requesting an insecure property, since modules own Debug class has not been added it's trusted prefixes from within it's init block yet. This seems to be a bug of the JVM .. to me, however .. the above description is the only able to explain the issue at hand. +++ Fix calls Debug class own static methods, either Debug.initSingleton() or Debug.debug(), before calling 'isPropertyDefined(propName, default)'. +++ Also mark Debug class static methods final! +++
* gluegen: remove unneeded casts to JarEntryHarvey Harrison2013-07-152-2/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove implied use of StringBuffer while appending to StringBuilderHarvey Harrison2013-07-151-2/+2
| | | | | | | - call append on the StringBuilder we are using rather than using String concatenation, which uses StringBuffer. Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove redundant test for null relativePathHarvey Harrison2013-07-151-1/+1
| | | | | | We are inside a block where relativePath must be non-null, remove the redundant check Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove redundant assignment of tmpBaseDirHarvey Harrison2013-07-151-2/+0
| | | | | | - can only be null here, remove the entire else condition Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: annotate Hastable of attributes as Hashtable<String, Object>Harvey Harrison2013-07-151-11/+11
| | | | | | | - use copy-constructor rather than clone to suppress type warnings - annotate a Class as Class<?> Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove unneeded casts to TNodeHarvey Harrison2013-07-151-4/+4
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* FunctionSymbol: Fix equals/hashCode comparison, i.e. skip args/type due to ↵Sven Gothel2013-07-141-7/+25
| | | | non overloading of c-funcs.
* StringBuffer -> StringBuilderSven Gothel2013-07-143-5/+3
|
* Fix a typo (Retruns => Returns)Sylvestre Ledru2013-07-102-3/+3
|
* RunnableTask/FunctionTask run(): Write tExecuted in finally block, removing ↵Sven Gothel2013-07-092-8/+6
| | | | code redundancy and placing write at end of operation.
* Refine commit 5e01e993aeba4e95fc8aa6e75b3e295011e27bbb, skip ↵Sven Gothel2013-06-252-18/+22
| | | | Buffers.sizeOfBufferElem(..) call.
* UnixDynamicLinkerImpl: Unify impl. of openLibraryLocal(..), ↵Sven Gothel2013-06-254-115/+32
| | | | openLibraryGlobal(..) and lookupSymbolGlobal(..) - removing duplicate code.
* AbstractBuffer: Generalize 'capacity' calculation, since we may encounter a ↵Sven Gothel2013-06-251-1/+1
| | | | byte-buffer w/ given elementSize semantics
* Fix SingletonInstanceServerSocket.kill(): Needs to mark alive=false in case ↵Sven Gothel2013-06-251-1/+1
| | | | of JVM shutdown!
* Fix commit e46b51f75b550bc0faf70ae18f526d466d8180f3Sven Gothel2013-06-241-0/+3
| | | | Funny .. subclasses didn't compile in test compilation locally.
* SingletonInstance: Add stats about time/attempts, subtract real-time delta ↵Sven Gothel2013-06-241-10/+20
| | | | from remaining amount.
* Fix commit eb842815498f5926828b49c48fffce22fc9586a2: Adding missing filesSven Gothel2013-06-222-0/+179
|
* ProcAddressTable: Fix regressions: getField(..) -> getDeclaredField(..), ↵Sven Gothel2013-06-211-13/+38
| | | | incl. access check; Utilize 'AccessibleObject.setAccessible(Field[], true)' for performance.
* ProcAddressTable: If using a SecurityManager 'checkAllLinkPermission()' ↵Sven Gothel2013-06-211-6/+19
| | | | instead of 'checkAllPermissions' if accessing the cached function handles.
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle ↵Sven Gothel2013-06-219-108/+190
| | | | | | | | | | | | | | | | | | | | | | access (2) - Completes 23341a2df2d2ea36784a16fa1db8bc7385351a12 - Replace 'DynamicLinker' interface w/ well documented one - All DynamicLinker methods are now considered secure, i.e.: - open/lookup and close utilize reference counting on handle via a hash map. - lookupSymbol(..) and close(..) impl. validate the passed library handle whether it's retrieved via open*. This is the fast path, not that expensive. - lookupSymbolGlobal(..) performs Check acccess of 'new RuntimePermission("loadLibrary.*")' if SecurityManager is installed. This is the slow path. - DynamicLibraryBundleInfo now reflects the security requirements, i.e. whether priviledged access is needed.
* Fix regression of f69831574d4927d03d40c330d0b047d8c89622a4: Use ↵Sven Gothel2013-06-211-3/+5
| | | | getDeclaredField() and setAccessible(true) due to package private handle fields.