summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common
Commit message (Collapse)AuthorAgeFilesLines
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-0347-744/+747
| | | | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* Fix 'typo' in messages: 'Catched' -> 'Caught'Sven Gothel2014-06-286-16/+16
|
* Buffers: Split slice2Float(..) into dedicated methods for FloatBuffer and ↵Sven Gothel2014-06-271-32/+53
| | | | float[] backing-array - refine API doc w/ backing-array semantics
* Bug 1025 - GlueGen: Add accessor for compound fields of type array, pointer ↵Sven Gothel2014-06-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and string (code generation) Enhance compound access as delivered by Bug 1022, to also generate accessors (getter and setter) for array, pointer and string types. Allow configuration of array length either via their internal size (c-header) or config 'ReturnedArrayLength'. 'ReturnedArrayLength' allows specifying a java expression. Canonical field names of compounds are _now_ specified as follows for configuration entries: COMPOUND.FIELD e.g. StructA.fieldB Also allow configuration of pointer fields to be treated as referenced arrays via 'ReturnedArrayLength'. Further, allow specifying 'pointer fields' as String values via 'ReturnsString' configuration. ++++ Implementation details: - handle above described accessor features - enhance JavaDoc for generated accessors - generate native JNI compound and string accessor on demand - encapsule accessor code generation in their own methods - enhance exception messages - enhance type verbosity in debug mode - verbose debug output via GlueGen.debug() Tests: - Features covered by test1.[ch] and Test1p1JavaEmitter and Test1p2ProcAddressEmitter - Validated compilation and unit tests for modules: - joal - jogl (minor config changes req.) - jocl (minor config changes req.)
* ReflectionUtil.getConstructor: Add 'initializeClazz' argument, allowing to ↵Sven Gothel2014-06-172-10/+11
| | | | defer static class initialization
* Minor edits: space, final qualifier; setenv-build-*: Add generic JDK locationSven Gothel2014-06-171-1/+1
|
* gluegen: use parseInt, parseLong to avoid boxing unboxing an Integer/LongHarvey Harrison2014-05-171-2/+2
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* RunnableTask: Add static method 'invokeOnNewThread(..)' for convenience ↵Sven Gothel2014-05-111-1/+39
| | | | (Used in JOGL to mitigate Bug 1004)
* gluegen: avoid bugs with sign-extension in readUInt16Harvey Harrison2014-04-111-2/+3
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* Bitstream: Add 'throwIOExceptionOnEOF' mode; fix certain EOS situations ↵Sven Gothel2014-02-211-9/+85
| | | | (flush, skip)
* Bug 980: Refine Bitstream API 'signed' and 'unsigned' semantics - ↵Sven Gothel2014-02-211-39/+43
| | | | readUInt32(..) must return long due to EOF
* Bitstream: Another CamelCase fix: uint32LongtoInt -> uint32LongToIntSven Gothel2014-02-211-2/+2
|
* Bitstream: Refine c70c730b22c847668cf475dc6f841b85297ac3ab: 'toUint32Long' ↵Sven Gothel2014-02-211-10/+18
| | | | -> 'toUInt32Long', add 'uint32LongtoInt'
* Bitstream: Add static 'long toUint32Long(int)' and 'int toUint32Int(int)' ↵Sven Gothel2014-02-211-10/+32
| | | | conversion functions
* Bug 890: Adding versatile Bitstream implementationSven Gothel2014-02-201-0/+1341
| | | | | | | | | | | | | | | | We already have several locations where bitstream operations are required and partially implemented (JPEG decoder, media parsing, ..) as well as endian related conversion (elf parser, ..). Create a versatile Bitstream class allowing: - Utilize I/O operations on I/O streams, buffers and arrays - Consider MSBfirst / LSBfirst mode - Linear bit R/W operations - Bulk R/W operations w/ endian related type conversion - Allow mark/reset and switching streams and input/output mode - Optimized operations Complete set of unit tests included, covering hopefully all cases.
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..) / Instrument ↵Sven Gothel2014-02-121-8/+99
| | | | ReflectionUtil's forName(..) usage
* Bug 856 - Android: Support dual ABI (x86 i686 *and* ARMv7arm), i.e. pick ↵Sven Gothel2014-01-242-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'best' ABI - Use 'os.arch' as a prelim CPUType for MachineDescription - Always attempt to load a binary and parse it's elf header - Linux: self-exe - Android: gluegen-rt library - Other: java lib - Always use details (ABI) if ARM - Android: Check CPU_TYPE and CPU_TYPE2 // FIXME / HACK: // We use sCPUType for MachineDescriptionRuntime.getStatic() // until we have determined the final CPU_TYPE, etc. // MachineDescriptionRuntime gets notified via MachineDescriptionRuntime.notifyPropsInitialized() below. // // We could use Elf Ehdr's machine value to determine the bit-size // used for it's offset table! // However, 'os.arch' should be a good guess for this task. Tested manually on - Linux x86, x86_64, armhf (raspi) - Android intel and arm - Windows x86_64 - OSX x86_64
* Platform: Fix API doc of getCPUFamily(), getCPUType() and getABIType()Sven Gothel2014-01-231-3/+9
|
* Bug 945 - GlueGen's IOUtil does not consider file URI's authority when ↵Sven Gothel2014-01-221-11/+32
| | | | | | | | | | | | | | | | | | | | | | | converting to file-path or URI (Windows UNC / share host) Note: Authority for 'file-scheme' URI's is used on Windows to denote the host of the shared resource -> UNC Following methods of IOUtil didn't consider the authority for file-scheme URI: 'URL toURL(final URI uri)' 'String decodeURIToFilePath(final String uriPath)' 'String decodeURIIfFilePath(final URI uri)' Further more, the patterns 'patternSingleFS' and 'patternSingleBS' converted multiple '\' '/' to one replacement. However, we should not change the separator count and replace them one-by-one. TestIOUtilURIHandling: - Added shared-file-host 'filehost' test cases to file URIs and plain file path tests. - Passed on Unix and Windows. Added 'make/scripts/test-win32-smb_share.bat' - Testing actual windows share usage - Passed on Windows
* Add TaskBase.flush(Throwsable): To propagate optional reason for flush ; ↵Sven Gothel2014-01-111-1/+10
| | | | Deprecate flush()
* IntBitfield: Fix ctor: min 1 unit; Fix getBitCount(): Use unsigned ↵Sven Gothel2014-01-091-9/+14
| | | | right-shift '>>>'
* IOUtil: Add convenience compound class 'ClassResources'Sven Gothel2013-12-301-0/+37
|
* IOUtil.encodeToURI(): Only use method if requiredSven Gothel2013-11-281-3/+3
| | | | | | | Only use IOUtil.encodeToURI() if required, i.e. 'new URI(String)' but not 'new URI(scheme, ...)' since the latter already encodes the path. TestIOUtilURIHandling.test00BasicCoding() validates above findings.
* IOUtil.toURL(..) Apply decodeFromURI(uri.getPath()) if file-scheme; Add ↵Sven Gothel2013-11-282-13/+75
| | | | | | | | | | | | | | | | | | | IOUtil.decodeURIToFilePath(..) for native usage. Refine comments, API doc. toURL(..): Apply space conversion, decodeFromURI(..), on file-scheme path, ensuring decoded space. ++ Add decodeURIToFilePath(String uriPath) and decodeURIToFilePath(URI uri) Both methods shall simplify decoding a file-URI for native platform usage. Tested in TestIOUtilURIHandling +++
* JARUtil/IOUtil: Reuse IOUtil.JAR_SCHEME_SEPARATOR (now a char); Add DEBUG to ↵Sven Gothel2013-11-272-7/+12
| | | | JarUtil.getJarEntry(..)
* IOUtil: Add comments to slashify args @ caller; Use validated File @ ↵Sven Gothel2013-11-271-7/+7
| | | | | | | | | | | | | | | | | | | IOUtil.toURISimple ; DEBUG: stdout -> stderr Add comments to slashify(..) arguments for better documentation. +++ Use validated File @ IOUtil.toURISimple(..): slashify(file, true, isDirectory) to slashify(new File(path).getAbsolutePath(), true, isDirectory) i.e. same w/ above variant and determine absolute path via File instance. +++ DEBUG: stdout -> stderr
* IOUtil/JarUtil: DEBUG output on stderr not stdoutSven Gothel2013-11-272-26/+30
|
* JarUtil: Use common strings for exceptions (same as used in IOUtil)Sven Gothel2013-11-271-2/+2
|
* Bug 754 - JarUtil: Add method to generate resource URI from class's Jar URI ↵Sven Gothel2013-10-312-0/+68
| | | | and resource name (Remove Ubuntu fonts from jogl-all.jar, provide it separately to reduce footprint for the masses.)
* TempJarCache: Make 'initialization' query/flag thread safe, i.e. synchronize ↵Sven Gothel2013-10-241-4/+21
| | | | | | | if !isInit (dbl-check locking) - isInit must be set to 'true' _after_ actual initialization, so caller can be blocked until done - staticInitError must be volatile as well
* 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-1715-0/+42
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: remove trailing whitespaceHarvey Harrison2013-10-1757-1464/+1464
| | | | 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-221-1/+1
| | | | | | | | 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]>