URLResource.java
10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.forms.rm.impl.URLResource$$anonfun
* com.adobe.forms.rm.impl.URLResource$$anonfun$lastModifiedTime
* com.adobe.forms.rm.impl.URLResource$$anonfun$source
* org.slf4j.Logger
* org.slf4j.LoggerFactory
* scala.Function0
* scala.Function1
* scala.Option
* scala.ScalaObject
* scala.Some
* scala.collection.immutable.Map
* scala.reflect.ScalaSignature
* scala.runtime.AbstractFunction0
* scala.runtime.AbstractFunction0$mcJ
* scala.runtime.AbstractFunction0$mcJ$sp
* scala.runtime.AbstractFunction1
* scala.runtime.BoxesRunTime
*/
package com.adobe.forms.rm.impl;
import com.adobe.forms.logging.PerfLogger$;
import com.adobe.forms.rm.Resource$;
import com.adobe.forms.rm.URIResource;
import com.adobe.forms.rm.impl.URLResource$;
import java.io.InputStream;
import java.net.URL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.Function0;
import scala.Function1;
import scala.Option;
import scala.ScalaObject;
import scala.Some;
import scala.collection.immutable.Map;
import scala.reflect.ScalaSignature;
import scala.runtime.AbstractFunction0;
import scala.runtime.AbstractFunction1;
import scala.runtime.BoxesRunTime;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
@ScalaSignature(bytes="\u0006\u0001\u0005eb\u0001B\u0001\u0003\u00015\u00111\"\u0016*M%\u0016\u001cx.\u001e:dK*\u00111\u0001B\u0001\u0005S6\u0004HN\u0003\u0002\u0006\r\u0005\u0011!/\u001c\u0006\u0003\u000f!\tQAZ8s[NT!!\u0003\u0006\u0002\u000b\u0005$wNY3\u000b\u0003-\t1aY8n\u0007\u0001\u00192\u0001\u0001\b\u0013!\ty\u0001#D\u0001\u0005\u0013\t\tBAA\u0006V%&\u0013Vm]8ve\u000e,\u0007CA\n\u0017\u001b\u0005!\"\"A\u000b\u0002\u000bM\u001c\u0017\r\\1\n\u0005]!\"aC*dC2\fwJ\u00196fGRD\u0001\"\u0007\u0001\u0003\u0002\u0003\u0006IAG\u0001\bG>tG/\u001a8u!\t\u00192$\u0003\u0002\u001d)\t1\u0011I\\=SK\u001aD\u0001B\b\u0001\u0003\u0002\u0003\u0006IaH\u0001\bG>tG/\u001a=u!\r\u0019\u0002EI\u0005\u0003CQ\u0011aa\u00149uS>t\u0007CA\u0012'\u001d\t\u0019B%\u0003\u0002&)\u00051\u0001K]3eK\u001aL!a\n\u0015\u0003\rM#(/\u001b8h\u0015\t)C\u0003\u0003\u0005+\u0001\t\u0005\t\u0015!\u0003,\u0003\ri\u0017\r\u001d\t\u0005G1\u0012c&\u0003\u0002.Q\t\u0019Q*\u00199\u0011\u0005My\u0013B\u0001\u0019\u0015\u0005\r\te.\u001f\u0005\u0006e\u0001!\taM\u0001\u0007y%t\u0017\u000e\u001e \u0015\tQ2t\u0007\u000f\t\u0003k\u0001i\u0011A\u0001\u0005\u00063E\u0002\rA\u0007\u0005\b=E\u0002\n\u00111\u0001 \u0011\u001dQ\u0013\u0007%AA\u0002-B\u0001B\u000f\u0001\t\u0006\u0004%\teO\u0001\u0007e\u0016\u001c8*Z=\u0016\u0003}A\u0001\"\u0010\u0001\t\u0002\u0003\u0006KaH\u0001\be\u0016\u001c8*Z=!\u0011!y\u0004\u0001#b\u0001\n\u0003\u0001\u0015AB:pkJ\u001cW-F\u0001B!\r\u0019\"\tR\u0005\u0003\u0007R\u0011Q!\u0011:sCf\u0004\"aE#\n\u0005\u0019#\"\u0001\u0002\"zi\u0016D\u0001\u0002\u0013\u0001\t\u0002\u0003\u0006K!Q\u0001\bg>,(oY3!\u0011\u001dQ\u0005A1A\u0005\n-\u000b1!\u001e:m+\u0005a\u0005CA'S\u001b\u0005q%BA(Q\u0003\rqW\r\u001e\u0006\u0002#\u0006!!.\u0019<b\u0013\t\u0019fJA\u0002V%2Ca!\u0016\u0001!\u0002\u0013a\u0015\u0001B;sY\u0002Bqa\u0016\u0001A\u0002\u0013%\u0001,\u0001\u0006fqBL'/\u0019;j_:,\u0012!\u0017\t\u0003'iK!a\u0017\u000b\u0003\t1{gn\u001a\u0005\b;\u0002\u0001\r\u0011\"\u0003_\u00039)\u0007\u0010]5sCRLwN\\0%KF$\"a\u00182\u0011\u0005M\u0001\u0017BA1\u0015\u0005\u0011)f.\u001b;\t\u000f\rd\u0016\u0011!a\u00013\u0006\u0019\u0001\u0010J\u0019\t\r\u0015\u0004\u0001\u0015)\u0003Z\u0003-)\u0007\u0010]5sCRLwN\u001c\u0011\t\u000f\u001d\u0004\u0001\u0019!C\u00051\u0006aA.Y:u\u001b>$\u0017NZ5fI\"9\u0011\u000e\u0001a\u0001\n\u0013Q\u0017\u0001\u00057bgRlu\u000eZ5gS\u0016$w\fJ3r)\ty6\u000eC\u0004dQ\u0006\u0005\t\u0019A-\t\r5\u0004\u0001\u0015)\u0003Z\u00035a\u0017m\u001d;N_\u0012Lg-[3eA!9q\u000e\u0001b\u0001\n\u0013\u0001\u0018A\u00027pO\u001e,'/F\u0001r!\t\u0011x/D\u0001t\u0015\t!X/A\u0003tY\u001a$$NC\u0001w\u0003\ry'oZ\u0005\u0003qN\u0014a\u0001T8hO\u0016\u0014\bB\u0002>\u0001A\u0003%\u0011/A\u0004m_\u001e<WM\u001d\u0011\t\u000bq\u0004A\u0011I?\u0002!1\f7\u000f^'pI&4\u0017.\u001a3US6,G#A-\b\u0011}\u0014\u0011\u0011!E\u0003\u0003\u0003\t1\"\u0016*M%\u0016\u001cx.\u001e:dKB\u0019Q'a\u0001\u0007\u0011\u0005\u0011\u0011\u0011!E\u0003\u0003\u000b\u0019R!a\u0001\u0002\bI\u0001B!!\u0003\u0002\u00105\u0011\u00111\u0002\u0006\u0004\u0003\u001b\u0001\u0016\u0001\u00027b]\u001eLA!!\u0005\u0002\f\t1qJ\u00196fGRDqAMA\u0002\t\u0003\t)\u0002\u0006\u0002\u0002\u0002!Q\u0011\u0011DA\u0002#\u0003%\t!a\u0007\u0002\u001d%t\u0017\u000e\u001e\u0013eK\u001a\fW\u000f\u001c;%eU\u0011\u0011Q\u0004\u0016\u0004?\u0005}1FAA\u0011!\u0011\t\u0019#!\f\u000e\u0005\u0005\u0015\"\u0002BA\u0014\u0003S\t\u0011\"\u001e8dQ\u0016\u001c7.\u001a3\u000b\u0007\u0005-B#\u0001\u0006b]:|G/\u0019;j_:LA!a\f\u0002&\t\tRO\\2iK\u000e\\W\r\u001a,be&\fgnY3\t\u0015\u0005M\u00121AI\u0001\n\u0003\t)$\u0001\bj]&$H\u0005Z3gCVdG\u000fJ\u001a\u0016\u0005\u0005]\"fA\u0016\u0002 \u0001")
public class URLResource
extends URIResource
implements ScalaObject {
private Option<String> resKey;
private byte[] source;
private final URL com$adobe$forms$rm$impl$URLResource$$url;
private long com$adobe$forms$rm$impl$URLResource$$expiration;
private long com$adobe$forms$rm$impl$URLResource$$lastModified;
private final Logger com$adobe$forms$rm$impl$URLResource$$logger;
public volatile int bitmap$0;
public static final Map init$default$3() {
return URLResource$.MODULE$.init$default$3();
}
public static final Option init$default$2() {
return URLResource$.MODULE$.init$default$2();
}
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
@Override
public Option<String> resKey() {
if ((this.bitmap$0 & 1) != 0) return this.resKey;
URLResource uRLResource = this;
synchronized (uRLResource) {
if ((this.bitmap$0 & 1) == 0) {
this.resKey = new Some((Object)this.com$adobe$forms$rm$impl$URLResource$$url().toString());
this.bitmap$0 |= 1;
}
return this.resKey;
}
}
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
@Override
public byte[] source() {
if ((this.bitmap$0 & 2) != 0) return this.source;
URLResource uRLResource = this;
synchronized (uRLResource) {
if ((this.bitmap$0 & 2) == 0) {
this.source = (byte[])Resource$.MODULE$.using(this.com$adobe$forms$rm$impl$URLResource$$url().openStream(), new scala.Serializable(this){
public static final long serialVersionUID;
public static {
long l = $anonfun$source$1.serialVersionUID = 0;
}
public final byte[] apply(InputStream stream) {
return Resource$.MODULE$.enrichInputStream(stream).asByteArray();
}
});
this.bitmap$0 |= 2;
}
return this.source;
}
}
public final URL com$adobe$forms$rm$impl$URLResource$$url() {
return this.com$adobe$forms$rm$impl$URLResource$$url;
}
public final long com$adobe$forms$rm$impl$URLResource$$expiration() {
return this.com$adobe$forms$rm$impl$URLResource$$expiration;
}
public final void com$adobe$forms$rm$impl$URLResource$$expiration_$eq(long l) {
this.com$adobe$forms$rm$impl$URLResource$$expiration = l;
}
public final long com$adobe$forms$rm$impl$URLResource$$lastModified() {
return this.com$adobe$forms$rm$impl$URLResource$$lastModified;
}
public final void com$adobe$forms$rm$impl$URLResource$$lastModified_$eq(long l) {
this.com$adobe$forms$rm$impl$URLResource$$lastModified = l;
}
public final Logger com$adobe$forms$rm$impl$URLResource$$logger() {
return this.com$adobe$forms$rm$impl$URLResource$$logger;
}
@Override
public long lastModifiedTime() {
return BoxesRunTime.unboxToLong(PerfLogger$.MODULE$.measure((Function0<Object>)new scala.Serializable(this){
public static final long serialVersionUID;
public static {
long l = $anonfun$lastModifiedTime$2.serialVersionUID = 0;
}
public final String apply() {
return "URLResource.lastModifiedTime";
}
}, new scala.Serializable(this){
public static final long serialVersionUID;
private final URLResource $outer;
public static {
long l = $anonfun$lastModifiedTime$1.serialVersionUID = 0;
}
public final long apply() {
return this.apply$mcJ$sp();
}
public long apply$mcJ$sp() {
long exceptionResult1 = 0;
try {
if (this.$outer.com$adobe$forms$rm$impl$URLResource$$lastModified() == 0 || this.$outer.com$adobe$forms$rm$impl$URLResource$$expiration() < java.lang.System.currentTimeMillis()) {
java.net.URLConnection urlConnection = this.$outer.com$adobe$forms$rm$impl$URLResource$$url().openConnection();
this.$outer.com$adobe$forms$rm$impl$URLResource$$lastModified_$eq(urlConnection.getLastModified());
this.$outer.com$adobe$forms$rm$impl$URLResource$$expiration_$eq(urlConnection.getExpiration());
this.$outer.com$adobe$forms$rm$impl$URLResource$$logger().debug(new scala.collection.mutable.StringBuilder().append((Object)"URLResource.lastModifiedTime : cache expired for ").append((Object)this.$outer.absPath()).append((Object)" : Expiration time ").append((Object)BoxesRunTime.boxToLong((long)this.$outer.com$adobe$forms$rm$impl$URLResource$$expiration())).append((Object)" LastModified Time").append((Object)BoxesRunTime.boxToLong((long)this.$outer.com$adobe$forms$rm$impl$URLResource$$lastModified())).toString());
}
exceptionResult1 = this.$outer.com$adobe$forms$rm$impl$URLResource$$lastModified();
}
catch (java.lang.Throwable v0) {
exceptionResult1 = 0;
}
return exceptionResult1;
}
}));
}
public URLResource(Object content, Option<String> context, Map<String, Object> map) {
super(content, context, map);
this.com$adobe$forms$rm$impl$URLResource$$url = new URL(this.absPath());
this.com$adobe$forms$rm$impl$URLResource$$expiration = 0;
this.com$adobe$forms$rm$impl$URLResource$$lastModified = 0;
this.com$adobe$forms$rm$impl$URLResource$$logger = LoggerFactory.getLogger(this.getClass());
}
}