aboutsummaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/common/net
Commit message (Collapse)AuthorAgeFilesLines
* SingletonTestCase -> SingletonJunitCase: Accomodate ClassLoader lifecycle of ↵Sven Gothel2014-10-037-14/+14
| | | | static fields; Change name to avoid testing itself.
* SingletonTestCase: Move singleton test impl. from JOGL's UITestCase, inherit ↵Sven Gothel2014-10-037-14/+14
| | | | | | | | | 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
* Bug 1063: Uri: Refine API doc; Add create(Encoded ..) ; Provide common impl. ↵Sven Gothel2014-09-102-24/+148
| | | | | | | | | | | | | | | | | | | | for getNormalized(), getDirectory(), getParent() and getRelativeOf() - Refine API doc - Add notion of {@code host} and {@code port} validation - Add create(Encoded ..), allowing creation of variants w/o re-encoding - Provide common impl. for getNormalized(), getDirectory(), getParent() and getRelativeOf() Above feature methods share common goals, hence use same implementation: - If opaque, cut-off query and merge after operation - cleanup path, i.e. /dummy/../test/ -> /test/ - cutoff file, dir - if requested - append optional appendix and cleanup again Return behavior various thought, i.e. null, this or allow exception. Enhanced test of above features.
* Bug 1063: Further Uri completion - As a result of JOGL Uri adoptionSven Gothel2014-09-081-11/+10
|
* Bug 1063: Complete Uri impl. and adoption throughout GlueGenSven Gothel2014-09-084-267/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Bug 1063 - Refine Uri and Uri.Encode ; Fix unit tests (passing on GNU/Linux, ↵Sven Gothel2014-09-072-52/+31
| | | | | | | | | | | | | OSX and Windows) - Refine Uri - remove System.err.print* - scheme is of type Encode - Refine Uri.Encode - substring(..) shall return type Encode - Fix unit tests (passing on GNU/Linux, OSX and Windows)
* Bug 1063 - Uri.PATH_LEGAL: Remove reserved 'punct', encoding all reserved ↵Sven Gothel2014-09-071-15/+14
| | | | chars but '!', allows removal of PATH_MIN_LEGAL ; Add comment for Harmony values for review
* Bug 1063 - Utilize own Uri and Uri.Encoded class w/ proper encoding and ↵Sven Gothel2014-09-078-14/+898
| | | | | | | | | | | | 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!
* Bug 908: Fix URI/URL double encoding, ensuring encoded/decoded variants are ↵Sven Gothel2014-09-072-23/+189
| | | | | | | | | | | | | | | | | | | | 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>.
* Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-036-61/+61
| | | | | | | | | | | | | | | 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 Bug 857: GlueGen produces erroneous file URI on Windows, which breaks ↵Sven Gothel2013-10-184-241/+149
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' to all *Test* classesSven Gothel2013-08-313-0/+12
|
* URIQueryProps: Custumize query separator, allowing user to favor ';' over '&'Sven Gothel2013-08-301-1/+1
|
* Add URIQueryProps: Simple tool to process URI queries as propertiesSven Gothel2013-08-281-0/+26
|
* Fix URLCompositionTest for Bug 757 (3): If file, replace '/' in expected ↵Sven Gothel2013-06-191-2/+4
| | | | | | result w/ OS specific File.separatorChar Take 3 (duh!): JRE impl. varies .. i.e. plain URL w/o JAR path differs from URL w/ JAR scheme on Windows .. well.
* Fix URLCompositionTest for Bug 757 (2): If file, replace '/' in expected ↵Sven Gothel2013-06-191-1/+11
| | | | | | result w/ OS specific File.separatorChar The JAR entry shall stay untouched, i.e. separator is platform independent '/'.
* Fix URLCompositionTest for Bug 757: If file, replace '/' in expected result ↵Sven Gothel2013-06-191-10/+12
| | | | w/ OS specific File.separatorChar
* Fix Bug 757: Regression of URL to URI conversion (Encoded path not ↵Sven Gothel2013-06-191-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | compatible w/ file scheme. Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823). The URI encoded path cannot be read by File I/O (if file scheme), since the latter requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space). The encoded URL is produced if calling 'uri.toURL()' and hence the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'. Tested w/ - synthetic URI/URL coposition (unit test) - manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl. +++ Misc.: - 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)' ++
* Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL ↵Sven Gothel2013-06-093-49/+139
| | | | to remove DNS Lookups etc ..
* Fix IOUtil: Handle all '../' and './' cases by reducing the path.Sven Gothel2012-04-024-6/+33
|
* Add 'asset' URLConnection; IOUtil uses URLConnection / incr. effeciency; ↵Sven Gothel2012-03-174-0/+254
Android ClassLoaderUtil cleanup; - Add 'asset' URLConnection - Please read API doc 'PiggybackURLConnection' and 'AssetURLConnection' - Solves generic resource handling where platform locations may differ, ie ClassLoader lookup on Android in the 'assets/' subfolder. - New Android 'AssetDexClassLoader' uses 'assets/' folder for findResource(..) - aapt.signed (our APK ant task) - uses 'assets/' folder - adds the 'assetsdir' attribute allowing to copy other assets into the APK - IOUtil uses URLConnection / incr. effeciency - using URLConnection on all getResource(..) since URL is connected anyways for validation and URLConnection can be used by caller right away - String getRelativeOf(URL, String) -> URL getRelativeOf(URL, String) - preserves scheme, authority, etc - simple parentOf handling, more efficient - reusing new 'asset' protocol impl. - Android ClassLoaderUtil cleanup; - Use createClassLoader(..) impl for build-in static jogamp and user APKs, which removes code redundancy Tests: New code path, especially 'assets' are covered by new unit tests, no regressions on Linux.