| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
(segment) of the input stream (skipBytes, byteCount)
This method is inspired by Bug 1280, <https://github.com/sgothel/joal/pull/16>,
'copy only needed bytes' for JOAL's com.jogamp.openal.util.WAVData.loadFromStream(..).
This method is a revised version of the proposed IOHelpers.copyFromStream2ByteBuffer(..),
see <https://github.com/OndrejSpanel/joal/commit/1616659e98904270af4faca25b770d0983609735>
|
| |
|
|
|
|
| |
'yield_thread()' to avoid potential Java>17 collision (JEP 361)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
gluegen-rt -> gluegen_rt
- Fix finding native library for Elf parsing
- Fix one unit test
- Fix comments
Completes commit 330dad069dee5a0cc0480cf5cd9052000004223a
|
|
|
|
|
| |
Implementation currently uses 256 bit Secure Hash (SHA) algorithm, but this may change in the future.
Hence only use 'SHA' in the names, not 'SHA256'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime validation
This change implements a strong SHA256 signature over:
1) source tree inclusive make recipe (SHA256-Source)
2) all class files (SHA256-Classes)
3) all native libraries (SHA256-Natives)
4) the class files as deployed in the jar (SHA256-Classes-this)
5) the native libraries as deployed in the jar (SHA256-Natives-this)
and drops all of these in the deployed Jar file.
This allows SHA256 validation of (4) + (5) at runtime
and further complete validation (1), (2) and (3) offline.
Full SCC would now required (1) - (3) to be placed on a server for further validation.
Optionally we may use GPG <https://gnupg.org/> or PGP to validate the build entity to implement the chain of trust <https://en.wikipedia.org/wiki/Chain_of_trust>
The SHA256 runtime validation is tested via: com.jogamp.common.util.TestVersionInfo
|
|
|
|
| |
executables
|
|
|
|
| |
for System related Operations
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uri to handle relative path
Fix IOUtil.cleanPathString(..) special case:
Special case '/a/./../b' -> '/b'
requires to resolve './' before '../'.
Allow IOUtil and Uri to handle relative path:
- IOUtil.getParentOf(..)
- IOUtil.cleanPathString(..)
Handle cases:
'a/./../b' -> 'b'
'.././b' -> '../b'
- Uri: Handle null scheme
|
|
|
|
|
|
|
|
|
|
|
|
| |
caller to skip relative futile lookup
IOUtil.getResource(..) and IOUtil.ClassResources, needs more clarity.
ClassLoader shall be passed explicitly next to the optional
relative context Class instance.
This allows better efficiency, i.e. caller can pass ClassLoader
but skip a possible relative lookup, if not existing.
|
|
|
|
| |
deflated files w/ zip-level 9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test-executable ; Use CustomInflate for Performance
- Use 'WinMain' for Windows test-executable
This may have little difference than using std 'main' entry
- Add Windows x86_64 test executable
Since the reporter claims the test executable works well
on Windows i386, maybe utilizing a x86_64 test executable
on same VM fixes the issue
- Use CustomInflate for Performance
- Skips GZIP header
- Adds own custom header [magic, deflate-size, inflate-size]
- Own header allows simplified I/O read and deflation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IOUtil.testDirExe():
- Satisfactory when executed
Failure to execute produce an IOException right at ProcessBuilder.start().
Hence we can allow an unexpected process exit value,
since we only want to learn whether executable files are allowed.
- More debug options
DEBUG_EXE: 'jogamp.debug.IOUtil.Exe'
DEBUG_EXE_NOSTREAM: 'jogamp.debug.IOUtil.Exe.NoStream'
- if DEBUG_EXE
- a pre-existing 'jogamp_exe_tst'+<SUFFIX> will be used as-is.
- the test-exe will not be deleted
- StreamMonitor is being used to dump stdout/stderr
if !DEBUG_EXE_NOSTREAM.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use InterruptSource.Thread.create(..),
while reducing InterruptSource.Thread ctors to 3 variants.
- Use InterruptSource.Thread instead of java.lang.Thread where possible
- Use SourcedInterruptedException where possible
- SingletonInstanceServerSocket: start(), stop() and run()
- Persistent-Wait and Cancelable
- Add @since 2.3.2
|
|
|
|
| |
of put32/get32
|
| |
|
| |
|
|
|
|
| |
and bitCount(), add unit test (passed)
|
| |
|
|
|
|
| |
CompatibilityType.BACKWARD_COMPATIBLE_BINARY
|
|
|
|
|
|
| |
ArrayHashMap; Unify ctor for both impl.
Add/Enhance unit tests for both.
|
|
|
|
| |
-> v23x
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues.
Currently the StaticConfig is being queried
via the key[OSType, CPUType ..]
as pre-determined by Java properties or the ELF parser.
This adds complication to maintain different platforms
and the key query might not even be sufficient.
The MachineDescriptor's StaticConfig only purpose shall be
to speed-up native data size and offset/alignment retrieval.
This is done by using the StaticConfig index within
all StaticConfig[]s as a lookup-index for the precomputed
struct's size and offset tables.
+++
Solution:
Rename: MachineDescriptor -> MachineDataInfo
Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime
After having defined os.and.arch (OSType, CPUType and ABIType)
w/ the optional help of the now self containing ELF Reader (Bug 1125),
the native gluegen-rt library gets loaded enabling JNI methods.
It is satisfactory to retrieve MachineDataInfo
at runtime w/ JNI and find the matching/compatible StaticConfig.
Only in case none is found, the program needs to abort.
Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo
are stored for further use (see above).
This removes above complication and key to StaticConfig mapping.
New platforms simply need to add a new unique entry into the
StaticConfig[] table.
++
Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org,
and Bug 1014 (MIPSLE), thanks to Dejan Latinovic.
Parts of the patch for Bug 1014 from Dejan Latinovic are included.
also solved by this change set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELF Reader 'jogamp.common.os.elf' currently uses
Platform's pre-determined OS_TYPE and CPUType.
It also uses the host platforms MachineDescription,
hence can not read ELF files from other machines.
This also forbids Platform to determine CPUType etc
w/o having a valid 'os.arch' property.
+++
ElfHeader should be split in
- ElfHeaderPart1 (CPUType independent)
- ElfHeaderPart2 (CPUType dependent)
Fix shall make the ELF Reader self containing
by only using ELF CPUType data, etc.
This requires customization of struct parsing,
where MachineDescription.Static index shall be
- defined in ElfHeaderPart1 using e_Ident's CPUType.
- used in ElfHeaderPart2 and all its struct types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setting of stream position (optional)
- Add setting position entry, optionally supported,
e.g. ByteBufferStream and ByteArrayStream
- Remove 'msbFirst' parameter on all 'bulk' read/write
operations.
These methods use LSB-first always, allowing proper
stream access of data w/ different bit-sizes.
Data is now read/write as little-endian
and swapped accordingly.
Optimizations are adopted for LSB-first operations.
This change removes API confusion/bugs:
- removes one decision (parameter)
- removes the data reversion case
- removes bugs w/ different bit-sizes
|
|
|
|
| |
(500 ms) per JVM after test class (cooperative w/ other JVM test instances)
|
|
|
|
| |
static fields; Change name to avoid testing itself.
|
|
|
|
|
|
|
|
|
| |
from JunitTracer and use it for all tests.
- Certain performance tests don't make sense utilizing several jenkins unit tests on one machine,
hence singleton test execution is desired.
- JOGL's UITestCase also will derive from this SingletonTestCase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Validate active and GC'ed mapped-buffer count
in cleanAllSlices() via close() ..
- Fix missing unmapping last buffer in notifyLengthChangeImpl(),
branch criteria was off by one.
- cleanSlice(..) now also issues cleanBuffer(..) on the GC'ed entry,
hence if WeakReference is still alive, enforce it's release.
- cleanBuffer(..) reverts FLUSH_PRE_HARD -> FLUSH_PRE_SOFT
in case of an error.
- flush() -> flush(boolean metaData) to expose FileChannel.force(metaData).
- Add synchronous mode, flushing/syncing the mapped buffers when
in READ_WRITE mapping mode and issue FileChannel.force() if not READ_ONLY.
Above is implemented via flush()/flushImpl(..) for buffers and FileChannel,
as well as in syncSlice(..) for buffers only.
flush*()/syncSlice() is covered by:
- setLength()
- notifyLengthChange*(..)
- nextSlice()
Always issue flushImpl() in close().
- Windows: Clean all buffers in setLength(),
otherwise Windows will report:
- Windows: Catch MappedByteBuffer.force() IOException
- Optimization of position(..)
position(..) is now standalone to allow issuing flushSlice(..)
before gathering the new mapped buffer.
This shall avoid one extra cache miss.
Hence rename positionImpl(..) -> position2(..).
- All MappedByteBufferOutputStream.write(..) methods
issue syncSlice(..) on the last written current slice
to ensure new 'synchronous' mode is honored.
+++
Unit tests:
- Ensure test files are being deleted
- TestByteBufferCopyStream: Reduced test file size to more sensible values.
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Uri:
- Add error correction (fix) of path at ctor
in case a a contained Uri is requested from an opaque one.
The latter might come from URI/URL and is not properly encoded!
See Uri.PARSE_HINT_FIX_PATH
- Simplify conversion methods:
- valueOf(URI/URL): Re-encode only if not opaque
- getNativeFilePath() -> toFile()
- Move IOUtil Uri related constants to class Uri
- Add DEBUG and DEBUG_SHOWFIX
- Complete adoption of URI -> Uri changes
- IOUtil, JarUtil and TempJarCache still holds some
left over deprecated methods, which will be removed
after officially starting 2.3.0 (JOGL dependencies)
- Otherwise not URI utilization left
- Tests
- Cleaned ip TestUri01 and TestUri03Resolving
- TestUri03Resolving also tests URL -> Uri,
and hence mentioned Uri.PARSE_HINT_FIX_PATH
|
|
|
|
|
|
|
|
|
|
|
|
| |
differentiating encoded/decoded variants by type [Part 1]
- Add immutable com.jogamp.common.net.Uri class impl. RFC 2396 w/ encoding of RFC 3986
- Class Uri.Encoded is used to represent encoded parts
- IOUtil: Remove unused methods (residing in Uri) and mark others deprecated (will move to Uri)
- Adopt usage of Uri: This must be completet in follow-up commits!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used properly (Added unit test)
Bug 908 was caused by confusing URI encoded parts (e.g. scheme-specific-part) and it's decoded variant.
This especially happened due to:
- the fact, that the encoded and unencoded variant uses the same String type,
- the URI/URL decoding differs, is not complete (e.g. %20 .. SPACE remains in decoded part),
- and does not comply w/ RFC 2396 and RFC 3986 (encoding), e.g. not all RESERVED chars are encoded.
In branch 'v2.3.0_branch', we will introduce our own Uri and Uri.Encoded class
to solve above issue by replacing all URI usage w/ Uri.
- Backporting results of own Uri class introduction in branch 'v2.3.0_branch'
- Ensure the encoded URI parts are used where required, i.e. IOUtil.compose(..) etc
- TestNetIOURIReservedCharsBug908: Automated test, launching GlueGen jar file from an <i>odd pathname</i>.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/java/com/jogamp/common/jvm/JNILibLoaderBase.java
src/java/com/jogamp/common/os/Platform.java
src/junit/com/jogamp/common/util/TestTempJarCache.java
(re-injected that api-doc of addNativeJarLibsImpl)
|
| |
| |
| |
| | |
of the method.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
to 2.2.0)
|
|
|
|
| |
branch): Using direct regexp for excludes
|
|
|
|
|
|
|
| |
Refactor base semjar unit test class into
com.jogamp.junit.util.VersionSemanticsUtil, part of new gluegen-test-util.jar.
The new gluegen-test-util.jar shall be used by all other modules to test versioning.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TestVersionSemantics adds testing of semantic versioning
of 2.1.5 gluegen-rt.jar against the current version within a unit test.
Currently we expect BACKWARD_COMPATIBLE_USER
and need to toggle this to NON_BACKWARD_COMPATIBLE,
if actually perfoming non compatible major or minor version changes.
The latter is allowed right now, since we increment from 2.1 -> 2.2!
- Added https://github.com/jeluard/semantic-versioning semver.jar (Apache License Version 2.0)
|
|
|
|
| |
readUInt32(..) must return long due to EOF
|
|
|
|
| |
-> 'toUInt32Long', add 'uint32LongtoInt'
|
|
|
|
| |
conversion functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|