2015-06-23

java: Field Type Descriptors

A field descriptor represents the type of a class, instance, or local variable.

FieldType termTypeInterpretation
Bbytesigned byte
CcharUnicode character code point in the Basic Multilingual Plane, encoded with UTF-16
Ddoubledouble-precision floating-point value
Ffloatsingle-precision floating-point value
Iintinteger
Jlonglong integer
LClassName;referencean instance of class ClassName
eg. for ObjectLjava/lang/Object;
Sshortsigned short
Zbooleantrue or false
[referenceone array dimension
eg. for double[][][][[[D

2015-06-11

Oracle: JIRA issue activity breakdown

So you need how many issues get created, changed or commented per hour, each day.

SELECT * FROM (
   SELECT * FROM (
      SELECT
         ID                             AS "ISSUEID",
         TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED  ,
         TO_CHAR(CREATED, 'HH24')       AS HOURS    ,
         TO_CHAR(CREATED, 'DAY')        AS DOW      ,
         'NEW'                          AS "TYPE"
      FROM JIRAISSUE
      WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
      UNION ALL
      SELECT
         ISSUEID                                  ,
         TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED,
         TO_CHAR(CREATED, 'HH24')       AS HOURS  ,
         TO_CHAR(CREATED, 'DAY')        AS DOW    ,
         'CHANGE'                       AS "TYPE"
      FROM CHANGEGROUP
      WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
      UNION ALL
      SELECT
         ISSUEID                                  ,
         TO_CHAR(CREATED, 'YYYY-MM-DD') AS CREATED,
         TO_CHAR(CREATED, 'HH24')       AS HOURS  ,
         TO_CHAR(CREATED, 'DAY')        AS DOW    ,
         'COMMENT'                      AS "TYPE"
      FROM JIRAACTION
      WHERE CREATED >= TO_DATE('2015-01-01', 'YYYY-MM-DD')
   )
   PIVOT (
      COUNT(ISSUEID) FOR (HOURS)
      IN ('00', '01', '02', '03', '04', '05', '06', '07',
         '08', '09', '10', '11', '12', '13', '14', '15',
         '16', '17', '18', '19', '20', '21', '22', '23')
   )
) ORDER BY CREATED DESC, "TYPE" DESC;

Not my best, but what do you expect in ten minutes?

2015-06-10

java: How to bulk load the Java Exception Site List

This guide comes handy if you have a big site list that utilizes a Java applet as the primary entry point (Netscaler, Agile, HP BPM/PPM, etc), those you want to allow in browsers but latest Java blocks them, because they are not containing a security manifest.

Good to know

  • No wildcards at all in the exception file.
  • Specify the port if needed (like :8080), as the default is the protcol's default port (80 for http, 443 for https).
  • End URL-s with / to also allow subdirectories.
  • Your own (default) exception.sites file is at: C:\Users\<user>\AppData\LocalLow\Sun\Java\Deployment\security\exception.sites, this is what the Java Control Panel uses by default. You have to copy your existing stuff from here.
  • No comments are allowed in the exception.sites file... :-( If you try to have one, the exception file gets corrupted and will be skipped.

Step-by-step guide

  1. Create the file: C:\Users\<user>\AppData\LocalLow\Sun\Java\Deployment\deployment.config
  2. Set it's contents to be:
    deployment.system.config=file\:C\:/Windows/Sun/Java/Deployment/deployment.properties
  3. Create the file: C:\Windows\Sun\Java\Deployment\deployment.properties
  4. Set it's contents to be:
    #C:\Windows\Sun\Java\Deployment\deployment.properties
    deployment.webjava.enabled=true
    deployment.security.level=MEDIUM
    deployment.security.level.locked
    deployment.user.security.exception.sites=C\:/Windows/Sun/Java/Deployment/exception.sites
    install.disable.sponsor.offers=true
  5. Create the file: C:\Windows\Sun\Java\Deployment\exception.sites
  6. Now, you can copy your previous site list. You can even populate it by a login script.