Skip to content

Commit 1e31d69

Browse files
committed
Update JSVG from 1.6.1 to 1.7.1
- bumped spec version due to API change
1 parent b9d00b8 commit 1e31d69

File tree

6 files changed

+16
-15
lines changed

6 files changed

+16
-15
lines changed

platform/libs.jsvg/external/binaries-list

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
A84D34480044DB51A1448E9C0E32BD284B797288 com.github.weisj:jsvg:1.6.1
18+
2B5F6F42F2B26EE72F6405F66F839DEF459CCA3C com.github.weisj:jsvg:1.7.1

platform/libs.jsvg/external/jsvg-1.6.1-license.txt renamed to platform/libs.jsvg/external/jsvg-1.7.1-license.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Name: JSVG
2-
Version: 1.6.1
2+
Version: 1.7.1
33
Description: JSVG - A Java SVG implementation
44
License: MIT-jsvg
55
Origin: JSVG
66
URL: https://github.com/weisJ/jsvg
7-
Files: jsvg-1.6.1.jar
7+
Files: jsvg-1.7.1.jar
88

99
MIT License
1010

platform/libs.jsvg/manifest.mf

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Manifest-Version: 1.0
2-
OpenIDE-Module: org.netbeans.libs.jsvg
3-
OpenIDE-Module-Implementation-Version: 1
2+
OpenIDE-Module: org.netbeans.libs.jsvg/2
3+
OpenIDE-Module-Implementation-Version: 1.7.1
4+
OpenIDE-Module-Specification-Version: 2.0.0
45
OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/jsvg/Bundle.properties
56
AutoUpdate-Show-In-Client: false

platform/libs.jsvg/nbproject/project.properties

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18-
file.reference.jsvg-1.6.1.jar=external/jsvg-1.6.1.jar
19-
release.external/jsvg-1.6.1.jar=modules/ext/jsvg-1.6.1.jar
18+
file.reference.jsvg-1.7.1.jar=external/jsvg-1.7.1.jar
19+
release.external/jsvg-1.7.1.jar=modules/ext/jsvg-1.7.1.jar
2020

2121
is.autoload=true
2222
javac.source=1.8
2323

2424
nbm.homepage=https://github.com/weisJ/jsvg
2525
sigtest.gen.fail.on.error=false
26-
spec.version.base=1.23.0
26+
27+
spec.version.base.fatal.warning=false
28+

platform/libs.jsvg/nbproject/project.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
<package>com.github.weisj.jsvg.util</package>
5757
</public-packages>
5858
<class-path-extension>
59-
<runtime-relative-path>ext/jsvg-1.6.1.jar</runtime-relative-path>
60-
<binary-origin>external/jsvg-1.6.1.jar</binary-origin>
59+
<runtime-relative-path>ext/jsvg-1.7.1.jar</runtime-relative-path>
60+
<binary-origin>external/jsvg-1.7.1.jar</binary-origin>
6161
</class-path-extension>
6262
</data>
6363
</configuration>

platform/openide.util.ui.svg/src/org/openide/util/svg/SVGIcon.java

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import com.github.weisj.jsvg.SVGDocument;
3838
import com.github.weisj.jsvg.geometry.size.FloatSize;
3939
import com.github.weisj.jsvg.parser.LoaderContext;
40+
import com.github.weisj.jsvg.parser.ParsedDocument;
4041
import com.github.weisj.jsvg.parser.ResourceLoader;
4142
import com.github.weisj.jsvg.parser.SVGLoader;
4243
import com.github.weisj.jsvg.renderer.awt.NullPlatformSupport;
@@ -128,14 +129,13 @@ private static SVGDocument loadSVGDocument(URL url, Dimension toSize) throws IOE
128129

129130
final SVGDocument svgDocument;
130131
FloatSize documentSize;
131-
InputStream is = url.openStream();
132-
try {
132+
try (InputStream is = url.openStream()) {
133133
// Explicitly deny loading of external URLs.
134134

135135
/* Handle e.g. <image href="https://example.com/image.png"> elements. Tested in
136136
testLoadImageWithExternalImageHref. */
137137
List<IOException> externalResourceExceptions = new ArrayList<>();
138-
ResourceLoader resourceLoader = (URI nnuri) -> {
138+
ResourceLoader resourceLoader = (ParsedDocument nnpd, URI nnuri) -> {
139139
IOException e = new IOException("External resource loading from SVG file not permitted ("+
140140
nnuri + " from " + url + ")");
141141
externalResourceExceptions.add(e);
@@ -168,8 +168,6 @@ private static SVGDocument loadSVGDocument(URL url, Dimension toSize) throws IOE
168168
} catch (RuntimeException e) {
169169
/* Rethrow any uncaught exceptions that could be thrown when parsing invalid SVG files. */
170170
throw new IOException("Error parsing SVG file", e);
171-
} finally {
172-
is.close();
173171
}
174172
if (toSize != null) {
175173
int width = (int) Math.ceil(documentSize.getWidth());

0 commit comments

Comments
 (0)