summaryrefslogtreecommitdiffstats
path: root/src/java/com
Commit message (Collapse)AuthorAgeFilesLines
* gluegen: use enhanced for-loops in ArrayHashSetHarvey Harrison2013-04-031-10/+9
| | | | | | | | | | | | Fixes an infinite loop in addAll due to the following line: mod = mod || add(iter.next()) ; After the first successful add, mod will be true and thereafter iter.next will never be called again, due to || shortcutting. the loop will then run forever as any further elements will never be taken from the iterator, so hasNext will always be true. Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: use explicit ArrayList constructor to avoid @SuppressWarnings and ↵Harvey Harrison2013-04-031-4/+2
| | | | | | | | | clone() ArrayList.clone does _not_ make a shallow copy, a new internal array is allocated. As such, there is nearly no benefit to using clone(). Signed-off-by: Harvey Harrison <[email protected]>
* ArrayHashSet: Add ctor w/ initialCapacity and (initialCapacity, loadFactor)Sven Gothel2013-04-011-4/+24
|
* VersionUtil: add getManifest(.., String[] extensions) variant, allowing ↵Sven Gothel2013-03-281-5/+30
| | | | detection of multiple ordered extensions
* Revert version.timestamp to yyyyMMdd only, i.e. w/o HHmmSven Gothel2013-03-281-2/+2
| | | | | Changes in hour/minute is not only overkill, but may confuse our aggregation scripts, which compare versions. Out nodes time daemon may not be in synchronized that well.
* Bug 588: Adding jogamp.version property, i.e. 2.0.2-rc-<TIMESTAMP> used for ↵Sven Gothel2013-03-281-0/+25
| | | | | | | | | | | | Manifest ; Common jogamp_int_version for Android. Until 2.0.2 gets released, the version string is 2.0.2-rc-<TIMESTAMP> and used in the Manifest for IMPLEMENTATION_VERSION. The previous build version name of IMPLEMENTATION_VERSION goes into the new tag IMPLEMENTATION_BUILD. Further more, we use a common jogamp_int_version for Android, to make life more easy.
* Fix intptr_t*, uintptr_t*, ptrdiff_t* and size_t* mapping, map them to ↵Sven Gothel2013-03-202-4/+11
| | | | | | PointerBuffer, since referenced memory-size is arch dependent Added extensive PointerBuffer unit tests w/ new mapping in generated test class.
* Function- RunnableTask: Clear runnableException @ start for re-entry; Fix ↵Sven Gothel2013-03-183-11/+39
| | | | tExecuted (@ exception); Add debug property 'jogamp.debug.TaskBase.TraceSource', to dump ctor stack trace @ exception.
* Function- RunnableTask: Add PrintStream 'exceptionOut' argument allowing non ↵Sven Gothel2013-03-184-19/+45
| | | | | | | blocking exceptions to be shown. Exceptions occuring on non blocking off-thread tasks shall at least be made visible while not allowed to crash the system.
* Fix Long*HashMap impl. of IntIntHashMap: Better 64bit hash value, using new ↵Sven Gothel2013-03-122-12/+79
| | | | | | HashUtil. Introduce markup: /*keyHash*/(.*)/*keyHash*/ allowing Long*HashMap to inject hash function for 64bit value.
* Promote AWTEDTExecutor to public package com.jogamp.common.util.awt ; ↵Sven Gothel2013-02-282-1/+111
| | | | Exclude java.part.awt in android gluegen-rt.
* Minor edits to JarUtil.Resolver functionality: Exception types, avoiding ↵Sven Gothel2013-02-211-21/+40
| | | | duplicate processing of strings etc.
* Merge remote-tracking branch 'wwalker/bug_687_jar_resolver'Sven Gothel2013-02-211-1/+45
|\
| * Add security checks to resolver methods.Wade Walker2013-02-171-4/+26
| |
| * Make JarUtil work with custom classloadersWade Walker2013-02-111-1/+23
| | | | | | | | | | | | | | | | Added the ability for users to set a "resolver" in JarUtil that lets it find resources that are loaded by a custom classloader. This is needed in OSGi apps (like Eclipse RCP apps), since OSGi resources do not have simple jar: URLs (they use a custom protocol called bundleresource:).
* | Fix FunctionTask's run()/eval(..) return value assignment: Ensure it's done ↵Sven Gothel2013-02-143-34/+38
| | | | | | | | | | | | before syncObject.notifyAll() ; Make methods final Fixes commit b387d012103a02eb7d5eb919306583295ef09a38.
* | Adding Function and FunctionTask extending RunnableTask functionalitySven Gothel2013-02-134-118/+379
|/ | | | | Function allows passing arguments and having a return value in contrast to Runnable, where FunctionTask allows a Function to be invoked and waited for.
* Bug 681: Add Elf Parsing for other OS than Linux, if ARM and !ANDROID using ↵Sven Gothel2013-02-091-14/+40
| | | | | | | | /proc/self/exe (Linux) or a found java/jvm native lib. - PlatformPropsImpl.queryABITypeImpl: Check Elf Header for ARM + !ANDROID (i.e. add other OS than Linux, use native java/jmv lib) - NativeLibrary.enumerateLibraryPaths: Add 'sun.boot.library.path' to enumeration! - TestElfReader01: Add test for finding java/jvm native lib and parse it
* IOUtil.copyStream2ByteBuffer: Turns out on Android, no -1 (EOS) is returned ↵Sven Gothel2013-02-011-2/+2
| | | | - relax loop-condition (hope thats ok)
* IOUtil.copyStream2ByteBuffer: read while numRead > -1 ; add variant w/ ↵Sven Gothel2013-02-011-4/+19
| | | | initialCapcity
* Cleanup GlueGen config 'ExtendedInterfaceSymbols*'Sven Gothel2013-01-311-17/+64
| | | | | | | | | | | | | | | | | | | Semantics Change: ExtendedInterfaceSymbolsOnly was used for implementation generation only, which is considered a bug! - ExtendedInterfaceSymbolsIgnore C.java - Ignore symbols in C.java for interface generation - ExtendedInterfaceSymbolsOnly C.java - Only use symbols in C.java for interface generation - ExtendedImplementationSymbolsIgnore C.java - Ignore symbols in C.java for implementation generation - ExtendedImplementationSymbolsOnly C.java - Only use symbols in C.java for implementation generation - ExtendedIntfAndImplSymbolsIgnore C.java - Ignore symbols in C.java for interface and implementation generation - ExtendedIntfAndImplSymbolsOnly C.java - Only use symbols in C.java for interface and implementation generation
* GlueGen: NativeLibrary Fix, JNILibLoaderBase EnhancementSven Gothel2013-01-302-81/+135
| | | | | | | | | | | | | | | | | | | - NativeLibrary Fix - enumerateLibraryPaths(..): - Properly iterate through all prefix _and_ suffix. - Make public for JNILibLoaderBase.loadLibraryInternal(..) - isValidNativeLibraryName(..): - Stop iterating through prefix, if previously found but suffix doesn't match. - JNILibLoaderBase.loadLibraryInternal(..) Enhancement - Mark customLibLoader FIXME: remove (we will get rid of jnlp.launcher.class) - If System.load(TempJarCache) and System.loadLibrary(plainLibName) fails, use NativeLibrary.enumerateLibraryPaths() w/ System.load(..) as last resort. Tested on Linux x86_64 Java6 and OSX Java7 manually, no regressions expected.
* Modified Java 1.5 Buffers patch 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0 - ↵Sven Gothel2013-01-193-21/+43
| | | | | | | | | | | | | | May break GCJ/ECJ .. needs to be revised. - Adding JAVA_6 in PlatformPropsImpl - Buffers.isDirect() chooses fast-path iff JAVA_6, otherwise using reflection (GCJ/ECJ) - Adding JAVA_6 info in VersionUtil - API doc: Refine JAVA_SE and JAVA_6 spec. TODO: In case GCJ etc is unable to compile the JAVA_6 code even though it uses a static condition (probably not), We have to wrap isStatic in an own class, one for JAVA_6 and one for <= 1.5. This will be a good exercise for further issues we may have w/ Java <= 1.5.
* Merge remote-tracking branch 'xranby/gcj-gij'Sven Gothel2013-01-181-3/+17
|\
| * Buffer.isDirect() operation is undefined w/ Eclipse ecj and GCJ gij JRE.Xerxes Rånby2013-01-181-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for the runtime error using GCJ gij JRE: java.lang.NoSuchMethodError: method java.nio.Buffer.isDirect with signature ()Z was not found. at com.jogamp.common.nio.Buffers.isDirect(Buffers.java:363) Also Eclipse ecj refuses to compile code using java.nio.Buffer.isDirect(). ---------- 1. ERROR ... return ((Buffer) buf).isDirect(); ^^^^^^^^ The method isDirect() is undefined for the type Buffer Signed-off-by: Xerxes Rånby <[email protected]>
* | RecursiveLock.getHoldCount(): Fix API doc formattingSven Gothel2013-01-181-4/+7
| |
* | Buffers: Fix typoSven Gothel2013-01-181-2/+2
|/
* PrimitiveStack: Add 'void position(int)' to set new position. Add test case ↵Sven Gothel2012-12-312-6/+22
| | | | w/ initialSizeElem:=0.
* Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a ↵Sven Gothel2012-12-302-0/+229
| | | | | | | | | | | | simple primitive stack implementation. Currently only FILO put/get operations are implemented using either primitive arrays as I/O itself or <Type>Buffer. Unit tests are included.. Note: Only FloatStack is implemented in a manual, where others (IntegerStack) is derived (generated) from it. Same goes w/ unit tests.
* Fix Bug625: StructAccessor missing setShortsAt() and getShortsAt() methods ↵Sven Gothel2012-12-301-0/+13
| | | | | | | | | | for short[] For short[] Java code gets emitted for an StructAccessor object that uses: void setShortsAt(int i, short[] shorts) short[] getShortsAt(int i, short[] shorts) Problem was that StructAccessor.java had no such methods - added.
* IntIntHashMap: Add privileged for 'getDeclaredMethod(..)'; Add StringBuilder ↵v2.0-rc11Sven Gothel2012-10-311-42/+75
| | | | toString(..); Add more generics coding.
* IntBitfield: Add API doc; Enhance put() method, return previous value to be ↵Sven Gothel2012-10-271-7/+27
| | | | used more versatile and write only if value changed.
* Adding com.jogamp.common.util.IntBitfield: Simple bitfield holder class ↵Sven Gothel2012-10-271-0/+71
| | | | | | | using an int[] storage. IntBitfield comes in handy to store bit states of a wide value range w/o being a memory hog an O(1) access, e.g. keyCode -> isPressed maps etc.
* Fix Bug 608: Push down TempJarCache.findLibrary(..) from ↵Sven Gothel2012-10-252-16/+15
| | | | | | | JNILibLoaderBase.loadLibraryInternal() to NativeLibrary.findLibrary(..) This allows using TempJarCache (if used/initialized) for native 'tool' libraries as well. This is the case of JOAL's attempt to load the provided 'libopenal.so'
* VersionNumber: API doc fixSven Gothel2012-10-241-1/+1
|
* VersionNumber: Add API doc for string parsingSven Gothel2012-10-241-0/+7
|
* VersionNumber: Remove printing Exception (was added for debugging purposes)Sven Gothel2012-10-241-1/+1
|
* Fix VersionNumber: Non digits cut off pattern was '\D.*' and cut off digits ↵Sven Gothel2012-10-241-43/+41
| | | | | | | | | | | | | | | | | | | in case leading non digits appear. '\D.*' matches a leading non-digit and then any character. First the string is tokenized by delim: "OpenGL ES GLSL ES 1.0.16" -> "OpenGL ES GLSL ES 1", "0", "16" Enhance pattern as follows and access collected group if matching: // group1: \D* == leading non digits, optional // group2: \d* == digits // group3: .* == any pending chars, optional final java.util.regex.Pattern nonDigitsCutOff = java.util.regex.Pattern.compile("(\\D*)(\\d*)(.*)"); Reorganized storage from atomic values to int[3] array, allowing simple pattern matching loop. Added unit test.
* Revert "Minor revert of clone replacement w/ copt-ctor of commit ↵Sven Gothel2012-10-183-7/+4
| | | | | | | | | | | | | | | d7fb6a7bcfbd2d5ac452abdcdd31fb4d71441c70" This reverts commit 73e8828566404e864170688dfb4fd530a83f8add. Convinced after discussing semantics w/ Harvey Harrison: "the copy-constructor is way for predictable (as in branch-predictable) and has better cache behavior, it can issue almost all the writes in parallel, and has no exception catching. So, the copy-constructor actually ends up being more efficient, and you get typechecking to boot."
* Fix Buffers.copy<Type>Buffer[asByteBuffer](..): Reset position of the passed ↵Sven Gothel2012-10-181-14/+15
| | | | | | | | | buffer (was missing). This is an API regression as introduced in commit 25cc744f6bd5ca97e0ae58fa7e1c35f7b0f3046d where JOGL's BufferUtil and GlueGen's were merged and API doc elaborated. The latter states the desired fact that the source passed buffer's position shall remain unchanged, however no code was added to take care of this detail.
* Minor revert of clone replacement w/ copt-ctor of commit ↵Sven Gothel2012-10-173-4/+7
| | | | | | d7fb6a7bcfbd2d5ac452abdcdd31fb4d71441c70 clone of ArrayList is more shallow than it's clone operation (?)
* Merge remote-tracking branch 'hharrison/RFC'Sven Gothel2012-10-176-20/+6
|\
| * gluegen: remove two fast-path tests that can never triggerHarvey Harrison2012-10-161-14/+0
| | | | | | | | | | | | | | | | ignores and unimplemented are both Set<Pattern>, they cannot contain a String, immediately after these 'fast paths' we loop over the patterns calling .matches() which makes sense, so remove the misleading tests. Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: generics annotations for various ArrayList/List useHarvey Harrison2012-10-155-6/+6
| | | | | | | | | | | | | | - Use the copy constructor rather than ArrayList.clone() - constrain listsEqual so the compiler will warn about comparing lists of different types Signed-off-by: Harvey Harrison <[email protected]>
* | Buffers: Add normalized put methods, i.e. incl. value range conversion; New ↵Sven Gothel2012-10-172-2/+269
|/ | | | util. ValueConv for primitive type value conversion
* ProcAddressEmitter: Remove 'guessing' argument names from types, since they ↵Sven Gothel2012-10-162-18/+2
| | | | are ambiguous - better use default generic ones to avoid confusion.
* Reducing Type's equalsSven Gothel2012-10-161-32/+0
|
* Intermediate revised Type.java edit before reducingSven Gothel2012-10-161-8/+34
|
* gluegen: conditional cleanup in Type.equals()Harvey Harrison2012-10-141-12/+7
| | | | | | | | - instanceof includes null checking - simplify comparison of name, either they are the same object (possibly null) or they compare equal as strings Signed-off-by: Harvey Harrison <[email protected]>
* gluegen: simplify expression comparing against Boolean.TRUEHarvey Harrison2012-10-131-7/+2
| | | | | | | | | As a last resort we can just return the boolean value directly here, also no need to try/catch as valueOf does not throw any exceptions. Pointed out by Findbugs. Signed-off-by: Harvey Harrison <[email protected]>