diff --git a/src/test/java/org/codetracker/blame/CodeTrackerBlameTest.java b/src/test/java/org/codetracker/blame/CodeTrackerBlameTest.java index b283badd281..a3b3b31732e 100644 --- a/src/test/java/org/codetracker/blame/CodeTrackerBlameTest.java +++ b/src/test/java/org/codetracker/blame/CodeTrackerBlameTest.java @@ -92,15 +92,6 @@ public void testBlameWithLocalRepoUsingFileTracker(String url, String filePath, assertEqualWithFile(expectedFilePath, actual); } - @Test - public void testBlameWithLocalRepo() throws Exception { - String url = "https://github.com/pouryafard75/DiffBenchmark/commit/5b33dc6f8cfcf8c0e31966c035b0406eca97ec76"; - String filePath = "src/main/java/dat/MakeIntels.java"; - String expectedFilePath = System.getProperty("user.dir") + "/src/test/resources/blame/blameTestWithLocalRepo2.txt"; - String actual = getBlameOutput(url, filePath, new CodeTrackerBlame(), REPOS_PATH, gitService); - assertEqualWithFile(expectedFilePath, actual); - } - @Test public void blameTestAttributeAnnotation() throws Exception { String url = "https://github.com/eclipse/jgit/commit/bd1a82502680b5de5bf86f6c4470185fd1602386"; diff --git a/src/test/resources/blame/blameTestUntilCommitZero.txt b/src/test/resources/blame/blameTestUntilCommitZero.txt index 6b1197eca09..7ad5c16dbea 100644 --- a/src/test/resources/blame/blameTestUntilCommitZero.txt +++ b/src/test/resources/blame/blameTestUntilCommitZero.txt @@ -968,11 +968,11 @@ dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 968) */ dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 969) public int getIndexVersion() { 1a06179ea org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-07-28 19:13:48 +0000 970) int indexVersion = config.getIndexVersion(); -616bc74cf org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-07-10 02:00:46 +0000 971) if (indexVersion <= 0) { +dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 971) if (indexVersion <= 0) { dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 972) for (BlockList objs : objectsLists) dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 973) indexVersion = Math.max(indexVersion, dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 974) PackIndexWriter.oldestPossibleFormat(objs)); -1a6964c82 org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Git Development Community 2009-09-29 23:47:03 +0000 975) } +dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 975) } dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 976) return indexVersion; dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 977) } 978) @@ -1152,13 +1152,13 @@ bc90ce778 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter cc6210619 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1152) out.flush(); 1153) 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1154) writeObjects(out); -c8c4524b6 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-13 21:43:11 +0000 1155) if (!edgeObjects.isEmpty() || !cachedPacks.isEmpty()) { +bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1155) if (!edgeObjects.isEmpty() || !cachedPacks.isEmpty()) { d9bbb04c3 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2015-06-12 20:56:16 +0000 1156) for (PackStatistics.ObjectType.Accumulator typeStat : stats.objectTypes) { bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1157) if (typeStat == null) bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1158) continue; bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1159) stats.thinPackBytes += typeStat.bytes; bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1160) } -c8c4524b6 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-13 21:43:11 +0000 1161) } +bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1161) } 1162) c8c4524b6 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-13 21:43:11 +0000 1163) stats.reusedPacks = Collections.unmodifiableList(cachedPacks); 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1164) for (CachedPack pack : cachedPacks) { @@ -1355,12 +1355,12 @@ f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 594d4ceb1 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Shawn Pearce 2013-04-04 17:56:42 +0000 1355) otp.setDoNotDelta(); f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1356) continue; f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1357) } -dfad23bf3 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-07-10 02:14:18 +0000 1358) } +f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1358) } f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1359) throw notFound; f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1360) } 1361) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1362) ObjectToPack otp = sizeQueue.getCurrent(); -f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1363) if (otp == null) +461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1363) if (otp == null) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1364) otp = objectsMap.get(sizeQueue.getObjectId()); 1365) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1366) long sz = sizeQueue.getSize(); @@ -1411,11 +1411,11 @@ dfad23bf3 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 1411) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1412) // Above we stored the objects we cannot delta onto the end. f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1413) // Remove them from the list so we don't waste time on them. -f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1414) while (0 < cnt && list[cnt - 1].isDoNotDelta()) { +37a10e300 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 14:55:43 +0000 1414) while (0 < cnt && list[cnt - 1].isDoNotDelta()) { 37a10e300 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 14:55:43 +0000 1415) if (!list[cnt - 1].isEdge()) 37a10e300 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 14:55:43 +0000 1416) nonEdgeCnt--; f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1417) cnt--; -f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1418) } +37a10e300 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 14:55:43 +0000 1418) } f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1419) if (cnt == 0) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1420) return; 1421) @@ -1608,7 +1608,7 @@ bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1608) if (reuseSupport != null) { 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1609) reuseSupport.writeObjects(out, list); 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1610) } else { -ece88b99e org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Shawn O. Pearce 2010-06-26 21:46:05 +0000 1611) for (ObjectToPack otp : list) +28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1611) for (ObjectToPack otp : list) 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1612) out.writeObject(otp); 28ba4747b org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:59:36 +0000 1613) } 1614) @@ -1645,10 +1645,10 @@ ece88b99e org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java 6b62e53b6 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-06-28 18:47:28 +0000 1645) out.endObject(); eb17495ca org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Shawn Pearce 2013-04-10 19:58:50 +0000 1646) otp.setCRC((int) crc32.getValue()); bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1647) typeStats.reusedObjects++; -71f168fcd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 01:17:57 +0000 1648) if (otp.isDeltaRepresentation()) { +977446e5d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-23 01:00:05 +0000 1648) if (otp.isDeltaRepresentation()) { bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1649) typeStats.reusedDeltas++; bb1956e64 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-03-18 18:31:12 +0000 1650) typeStats.deltaBytes += out.length() - otp.getOffset(); -71f168fcd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 01:17:57 +0000 1651) } +977446e5d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-23 01:00:05 +0000 1651) } ece88b99e org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Shawn O. Pearce 2010-06-26 21:46:05 +0000 1652) return; ece88b99e org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Shawn O. Pearce 2010-06-26 21:46:05 +0000 1653) } catch (StoredObjectRepresentationNotAvailableException gone) { ece88b99e org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Shawn O. Pearce 2010-06-26 21:46:05 +0000 1654) if (otp.getOffset() == out.length()) { @@ -1812,11 +1812,11 @@ dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1812) int haveEst = have.size(); 2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1813) if (have.isEmpty()) { c218a0760 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-01-27 16:58:44 +0000 1814) walker.sort(RevSort.COMMIT_TIME_DESC); -c218a0760 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-01-27 16:58:44 +0000 1815) } else { +2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1815) } else { ba984ba2e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-09-06 19:12:43 +0000 1816) walker.sort(RevSort.TOPO); 2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1817) if (thin) 1a6964c82 org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Git Development Community 2009-09-29 23:47:03 +0000 1818) walker.sort(RevSort.BOUNDARY, true); -c218a0760 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-01-27 16:58:44 +0000 1819) } +2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1819) } 1820) 3b4448637 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (David Pursehouse 2017-02-20 21:47:23 +0000 1821) List wantObjs = new ArrayList<>(want.size()); 3b4448637 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (David Pursehouse 2017-02-20 21:47:23 +0000 1822) List haveObjs = new ArrayList<>(haveEst); @@ -1831,7 +1831,7 @@ f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1831) RevObject o = q.next(); f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1832) if (o == null) f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1833) break; -2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1834) if (have.contains(o)) +9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1834) if (have.contains(o)) 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1835) haveObjs.add(o); 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1836) if (want.contains(o)) { 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1837) o.add(include); @@ -1840,7 +1840,7 @@ f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 19037e8cf org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-19 02:15:25 +0000 1840) wantTags.add((RevTag) o); 461b012e9 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-03 21:20:22 +0000 1841) } f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1842) } catch (MissingObjectException e) { -2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1843) if (ignoreMissingUninteresting +f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1843) if (ignoreMissingUninteresting 2fbcba41e org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-01 15:03:24 +0000 1844) && have.contains(e.getObjectId())) 1a6964c82 org.eclipse.jgit/src/org/eclipse/jgit/lib/PackWriter.java (Git Development Community 2009-09-29 23:47:03 +0000 1845) continue; f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2010-08-21 00:41:27 +0000 1846) throw e; @@ -1866,9 +1866,9 @@ f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 1866) 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1867) if (walker instanceof DepthWalk.ObjectWalk) { 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1868) DepthWalk.ObjectWalk depthWalk = (DepthWalk.ObjectWalk) walker; -9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1869) for (RevObject obj : wantObjs) { +7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1869) for (RevObject obj : wantObjs) { 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1870) depthWalk.markRoot(obj); -9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1871) } +7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1871) } 7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1872) // Mark the tree objects associated with "have" commits as 7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1873) // uninteresting to avoid writing redundant blobs. A normal RevWalk 7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1874) // lazily propagates the "uninteresting" state from a commit to its @@ -1882,9 +1882,9 @@ f048af3fd org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java 7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1882) } 1883) 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1884) if (unshallowObjects != null) { -9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1885) for (ObjectId id : unshallowObjects) { +7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1885) for (ObjectId id : unshallowObjects) { 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1886) depthWalk.markUnshallow(walker.parseAny(id)); -9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1887) } +7edf05530 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Terry Parker 2016-08-05 00:20:23 +0000 1887) } 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1888) } 9952223e0 org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Matt Fischer 2011-08-21 21:04:23 +0000 1889) } else { 19037e8cf org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Shawn O. Pearce 2011-02-19 02:15:25 +0000 1890) for (RevObject obj : wantObjs) @@ -2003,7 +2003,7 @@ dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2003) BitmapBuilder needBitmap = wantBitmap.andNot(haveBitmap); 2004) 6e5c71b35 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Shawn Pearce 2015-04-24 18:31:22 +0000 2005) if (useCachedPacks && reuseSupport != null && !reuseValidate -6e5c71b35 org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Shawn Pearce 2015-04-24 18:31:22 +0000 2006) && (excludeInPacks == null || excludeInPacks.length == 0)) +dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2006) && (excludeInPacks == null || excludeInPacks.length == 0)) dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2007) cachedPacks.addAll( dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2008) reuseSupport.getCachedPacksAndUpdate(needBitmap)); 2009) @@ -2221,7 +2221,7 @@ dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2221) for (PackWriterBitmapPreparer.BitmapCommit cmit : selectedCommits) { 8f7d0a4fb org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Zhen Chen 2017-05-03 22:02:33 +0000 2222) if (!cmit.isReuseWalker()) { dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2223) walker = bitmapPreparer.newBitmapWalker(); -dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2224) } +8f7d0a4fb org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Zhen Chen 2017-05-03 22:02:33 +0000 2224) } dafcb8f6d org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java (Colby Ranger 2013-03-05 19:14:45 +0000 2225) BitmapBuilder bitmap = walker.findObjects( 9fd1325ec org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java (Matthias Sohn 2014-09-26 13:45:46 +0000 2226) Collections.singleton(cmit), null, false); 2227) diff --git a/src/test/resources/blame/blameTestWithLocalRepo16.txt b/src/test/resources/blame/blameTestWithLocalRepo16.txt index 836b311b499..600e2e1f8bf 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo16.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo16.txt @@ -256,7 +256,7 @@ ea63463c2 src/main/java/libcore/net/spdy/SpdyConnection.java 60b3a6dd6 src/main/java/libcore/net/spdy/SpdyConnection.java (Jesse Wilson 2012-09-25 18:29:25 +0000 256) } fb46f100a okhttp-protocols/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java (Adrian Cole 2014-02-24 01:16:01 +0000 257) if (associatedStreamId == 0) { 3d43a8dba okhttp/src/main/java/okhttp3/internal/framed/FramedConnection.java (jwilson 2016-07-09 22:09:19 +0000 258) writer.synStream(outFinished, streamId, associatedStreamId, requestHeaders); -a5ba3e906 okhttp/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java (Adrian Cole 2014-03-02 05:23:04 +0000 259) } else if (client) { +1ab398fb9 okhttp/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java (Adrian Cole 2014-03-05 04:53:13 +0000 259) } else if (client) { 1ab398fb9 okhttp/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java (Adrian Cole 2014-03-05 04:53:13 +0000 260) throw new IllegalArgumentException("client streams shouldn't have associated stream IDs"); fb46f100a okhttp-protocols/src/main/java/com/squareup/okhttp/internal/spdy/SpdyConnection.java (Adrian Cole 2014-02-24 01:16:01 +0000 261) } else { // HTTP/2 has a PUSH_PROMISE frame. 3d43a8dba okhttp/src/main/java/okhttp3/internal/framed/FramedConnection.java (jwilson 2016-07-09 22:09:19 +0000 262) writer.pushPromise(associatedStreamId, streamId, requestHeaders); diff --git a/src/test/resources/blame/blameTestWithLocalRepo17.txt b/src/test/resources/blame/blameTestWithLocalRepo17.txt index 78503a04187..f960d289e29 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo17.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo17.txt @@ -498,7 +498,7 @@ dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-res 498) dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 499) // Try to assign containers to applications in fifo order de3b4aac5 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Jian He 2016-11-07 18:14:39 +0000 500) for (Map.Entry> e : applications -de3b4aac5 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Jian He 2016-11-07 18:14:39 +0000 501) .entrySet()) { +dbecbe5df hadoop-mapreduce/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Vinod Kumar Vavilapalli 2011-08-18 11:07:10 +0000 501) .entrySet()) { de3b4aac5 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Jian He 2016-11-07 18:14:39 +0000 502) FifoAppAttempt application = e.getValue().getCurrentAppAttempt(); 84dfae2f8 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Sanford Ryza 2014-05-14 06:41:20 +0000 503) if (application == null) { 84dfae2f8 hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.java (Sanford Ryza 2014-05-14 06:41:20 +0000 504) continue; diff --git a/src/test/resources/blame/blameTestWithLocalRepo20.txt b/src/test/resources/blame/blameTestWithLocalRepo20.txt index 050506b565c..8ab9d9567f1 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo20.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo20.txt @@ -94,7 +94,7 @@ c285d6f8b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ 448100ff8 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-06 10:02:01 +0000 94) int status = info.getStatus(); 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 95) boolean interimResponse = status == HttpStatus.CONTINUE_100 || status == HttpStatus.PROCESSING_102; 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 96) if (interimResponse) -06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 97) { +c285d6f8b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2017-04-03 20:25:50 +0000 97) { 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 98) // Must not commit interim responses. 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 99) if (hasContent) 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 100) { @@ -109,9 +109,9 @@ c1247ff67 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ c285d6f8b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2017-04-03 20:25:50 +0000 109) else c1247ff67 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-06-09 12:01:16 +0000 110) { 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 111) if (commit.compareAndSet(false, true)) -06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 112) { +ad034f4d5 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-06-10 10:02:54 +0000 112) { 418a49333 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-18 09:50:18 +0000 113) if (hasContent) -418a49333 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-18 09:50:18 +0000 114) { +3e602117b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-17 16:07:22 +0000 114) { 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 115) Callback commitCallback = new Callback.Nested(callback) e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 116) { e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 117) @Override @@ -157,7 +157,7 @@ c1247ff67 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ 3e602117b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-17 16:07:22 +0000 157) else c1247ff67 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-06-09 12:01:16 +0000 158) { 418a49333 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-18 09:50:18 +0000 159) if (hasContent || lastContent) -418a49333 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-09-18 09:50:18 +0000 160) { +ad034f4d5 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2014-06-10 10:02:54 +0000 160) { 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 161) if (lastContent) 06454f640 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2018-04-07 10:25:39 +0000 162) { c285d6f8b jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2017-04-03 20:25:50 +0000 163) Supplier trailers = metaData.getTrailerSupplier(); @@ -275,11 +275,11 @@ e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ 02b573272 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2015-02-09 08:11:56 +0000 275) // If the stream is not closed, it is still reading the request content. 02b573272 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2015-02-09 08:11:56 +0000 276) // Send a reset to the other end so that it stops sending data. 02b573272 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2015-02-09 08:11:56 +0000 277) if (!stream.isClosed()) -02b573272 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2015-02-09 08:11:56 +0000 278) { +cf0ecbd88 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-07-21 15:50:08 +0000 278) { cf0ecbd88 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-07-21 15:50:08 +0000 279) if (LOG.isDebugEnabled()) cf0ecbd88 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-07-21 15:50:08 +0000 280) LOG.debug("HTTP2 Response #{}: unconsumed request content, resetting stream", stream.getId()); 607239028 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Greg Wilkins 2015-07-22 07:31:54 +0000 281) stream.reset(new ResetFrame(stream.getId(), ErrorCode.CANCEL_STREAM_ERROR.code), Callback.NOOP); -02b573272 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2015-02-09 08:11:56 +0000 282) } +cf0ecbd88 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-07-21 15:50:08 +0000 282) } 283) d8961139f jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-05-11 11:57:08 +0000 284) // Consume the existing queued data frames to d8961139f jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-05-11 11:57:08 +0000 285) // avoid stalling the session flow control. @@ -337,7 +337,7 @@ e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 337) { e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 338) commit = this.commit; dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 339) if (state == State.WRITING) -dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 340) { +e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 340) { e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 341) this.state = State.IDLE; e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 342) callback = this.callback; dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 343) this.callback = null; @@ -364,7 +364,7 @@ e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/ 7e764bad3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2017-08-22 17:33:46 +0000 364) // Only fail pending writes, as we 7e764bad3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2017-08-22 17:33:46 +0000 365) // may need to write an error page. dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 366) if (state == State.WRITING) -dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 367) { +e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 367) { e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 368) this.state = State.FAILED; e21ad09e3 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-09-05 21:09:12 +0000 369) callback = this.callback; dd3a73e57 jetty-http2/http2-server/src/main/java/org/eclipse/jetty/http2/server/HttpTransportOverHTTP2.java (Simone Bordet 2016-12-14 10:19:49 +0000 370) this.callback = null; diff --git a/src/test/resources/blame/blameTestWithLocalRepo21.txt b/src/test/resources/blame/blameTestWithLocalRepo21.txt index c2d295f249a..600b3e95e81 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo21.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo21.txt @@ -530,8 +530,8 @@ f1d315ff4 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/Cl 530) 13025f875 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 531) for (/* empty */; scope != null; scope = scope.getParent()) { 4175460d3 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-15 13:42:22 +0000 532) // search each enclosing scope one by one -13025f875 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 533) for (Map.Entry> entry -13025f875 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 534) : scope.getDeclarations(VariableNameDeclaration.class).entrySet()) { +c8763bef1 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 533) for (Map.Entry> entry +c8763bef1 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 534) : scope.getDeclarations(VariableNameDeclaration.class).entrySet()) { 13025f875 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 535) if (entry.getKey().getImage().equals(image)) { 68c8fabdf pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-14 22:55:55 +0000 536) ASTType typeNode = entry.getKey().getDeclaratorId().getTypeNode(); 537) @@ -890,9 +890,9 @@ babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/Cl babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 890) ASTClassOrInterfaceDeclaration typeDeclaration babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 891) = currentChild.getFirstParentOfType(ASTClassOrInterfaceDeclaration.class); 892) -babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 893) if (typeDeclaration != null) { +d40e80742 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-31 13:59:48 +0000 893) if (typeDeclaration != null) { 68c8fabdf pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-14 22:55:55 +0000 894) currentChild.setTypeDefinition(typeDeclaration.getTypeDefinition()); -babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 895) } +d40e80742 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-31 13:59:48 +0000 895) } babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 896) } 897) 0ec1e44b1 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 18:23:11 +0000 898) // Last token, because if 'super' is a Suffix, it'll have tokens '.' and 'super' @@ -939,7 +939,7 @@ babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/Cl babe32a16 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-05-30 15:37:47 +0000 939) } 940) 941) -f4ec16338 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 942) if (currentChild.getType() != null) { +c8763bef1 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-03 22:28:38 +0000 942) if (currentChild.getType() != null) { 68c8fabdf pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-14 22:55:55 +0000 943) primaryNodeType = currentChild.getTypeDefinition(); 41ed666d4 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-14 16:11:20 +0000 944) } else { 41ed666d4 pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java (Bendegúz Nagy 2017-06-14 16:11:20 +0000 945) // avoid falsely passing tests diff --git a/src/test/resources/blame/blameTestWithLocalRepo8.txt b/src/test/resources/blame/blameTestWithLocalRepo8.txt index 53fb22ae48b..7629fb605e5 100644 --- a/src/test/resources/blame/blameTestWithLocalRepo8.txt +++ b/src/test/resources/blame/blameTestWithLocalRepo8.txt @@ -205,9 +205,9 @@ fb44ad936 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 205) if ( anns != null ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 206) for ( SequenceGenerator ann : anns ) { 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 207) IdentifierGeneratorDefinition idGen = buildIdGenerator( ann, context ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 208) if ( idGen != null ) { +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 208) if ( idGen != null ) { 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 209) context.getMetadataCollector().addDefaultIdentifierGenerator( idGen ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 210) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 210) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 211) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 212) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 213) } @@ -216,9 +216,9 @@ fb44ad936 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 216) if ( anns != null ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 217) for ( TableGenerator ann : anns ) { 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 218) IdentifierGeneratorDefinition idGen = buildIdGenerator( ann, context ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 219) if ( idGen != null ) { +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 219) if ( idGen != null ) { 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 220) context.getMetadataCollector().addDefaultIdentifierGenerator( idGen ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 221) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 221) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 222) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 223) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 224) } @@ -657,9 +657,9 @@ bf7607e24 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 657) ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 658) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 659) else { -025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 660) if ( clazzToProcess.isAnnotationPresent( Table.class ) ) { +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 660) if ( clazzToProcess.isAnnotationPresent( Table.class ) ) { a9b1425f3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (JPAV 2011-01-18 21:35:49 +0000 661) LOG.invalidTableAnnotation( clazzToProcess.getName() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 662) } +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 662) } 663) 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 664) if ( inheritanceState.getType() == InheritanceType.SINGLE_TABLE ) { 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 665) // we at least need to properly set up the EntityTableXref @@ -768,9 +768,9 @@ aeb3aee62 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 768) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 769) } 770) -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 771) if ( onDeleteAnn != null && !onDeleteAppropriate ) { +5329bba1e hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2013-12-13 06:57:47 +0000 771) if ( onDeleteAnn != null && !onDeleteAppropriate ) { a9b1425f3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (JPAV 2011-01-18 21:35:49 +0000 772) LOG.invalidOnDeleteAnnotation(propertyHolder.getEntityName()); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 773) } +5329bba1e hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2013-12-13 06:57:47 +0000 773) } 774) 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 775) // try to find class level generators b1a9c816a hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Andrea Boriero 2017-12-13 15:38:00 +0000 776) HashMap classGenerators = buildGenerators( clazzToProcess, context ); @@ -864,7 +864,7 @@ bf7607e24 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 864) } 5329bba1e hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2013-12-13 06:57:47 +0000 865) if ( discAnn != null && !isRoot ) { 62da5aa5b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2011-04-12 02:59:50 +0000 866) LOG.invalidDiscriminatorAnnotation( clazzToProcess.getName() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 867) } +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 867) } 868) 5329bba1e hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2013-12-13 06:57:47 +0000 869) final String discriminatorValue = clazzToProcess.isAnnotationPresent( DiscriminatorValue.class ) 5329bba1e hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2013-12-13 06:57:47 +0000 870) ? clazzToProcess.getAnnotation( DiscriminatorValue.class ).value() @@ -1240,10 +1240,10 @@ f0f82e4f1 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 3712e1ad7 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (JPAV 2011-01-18 22:00:59 +0000 1240) LOG.trace( "Subclass joined column(s) created" ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1241) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1242) else { -025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1243) if ( clazzToProcess.isAnnotationPresent( PrimaryKeyJoinColumns.class ) -025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1244) || clazzToProcess.isAnnotationPresent( PrimaryKeyJoinColumn.class ) ) { +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1243) if ( clazzToProcess.isAnnotationPresent( PrimaryKeyJoinColumns.class ) +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1244) || clazzToProcess.isAnnotationPresent( PrimaryKeyJoinColumn.class ) ) { de6d80a67 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Dominique Toupin 2016-03-30 14:55:05 +0000 1245) LOG.invalidPrimaryKeyJoinColumnAnnotation( clazzToProcess.getName() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1246) } +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1246) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1247) } 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1248) return inheritanceJoinedColumns; 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1249) } @@ -1276,10 +1276,10 @@ de6d80a67 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1276) || AnnotatedClassType.NONE.equals( classType ) //to be ignored 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1277) || AnnotatedClassType.EMBEDDABLE.equals( classType ) //allow embeddable element declaration 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1278) ) { -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1279) if ( AnnotatedClassType.NONE.equals( classType ) -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1280) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1279) if ( AnnotatedClassType.NONE.equals( classType ) +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1280) && clazzToProcess.isAnnotationPresent( org.hibernate.annotations.Entity.class ) ) { a9b1425f3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (JPAV 2011-01-18 21:35:49 +0000 1281) LOG.missingEntityAnnotation( clazzToProcess.getName() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1282) } +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 1282) } 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 1283) return false; 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1284) } 1285) @@ -1857,10 +1857,10 @@ b1f925458 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 1857) context 153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 1858) ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1859) } -ffb14b28b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2011-06-28 08:29:16 +0000 1860) else if ( property.isAnnotationPresent( OneToMany.class ) -ffb14b28b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2011-06-28 08:29:16 +0000 1861) || property.isAnnotationPresent( ManyToMany.class ) -ffb14b28b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2011-06-28 08:29:16 +0000 1862) || property.isAnnotationPresent( ElementCollection.class ) -ffb14b28b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2011-06-28 08:29:16 +0000 1863) || property.isAnnotationPresent( ManyToAny.class ) ) { +7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1860) else if ( property.isAnnotationPresent( OneToMany.class ) +7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1861) || property.isAnnotationPresent( ManyToMany.class ) +11668ca67 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-05-07 21:34:21 +0000 1862) || property.isAnnotationPresent( ElementCollection.class ) +7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1863) || property.isAnnotationPresent( ManyToAny.class ) ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1864) OneToMany oneToManyAnn = property.getAnnotation( OneToMany.class ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 1865) ManyToMany manyToManyAnn = property.getAnnotation( ManyToMany.class ); 11668ca67 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-05-07 21:34:21 +0000 1866) ElementCollection elementCollectionAnn = property.getAnnotation( ElementCollection.class ); @@ -2387,10 +2387,10 @@ e14f58de2 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 7a1c15509 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-21 19:45:44 +0000 2387) String generatorName = generatedValue != null 7a1c15509 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-21 19:45:44 +0000 2388) ? generatedValue.generator() 7a1c15509 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-21 19:45:44 +0000 2389) : BinderHelper.ANNOTATION_STRING_DEFAULT; -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2390) if ( isComponent ) { +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2390) if ( isComponent ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2391) //a component must not have any generator 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2392) generatorType = "assigned"; -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2393) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2393) } 2394) 6cefa865b hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Andrea Boriero 2018-04-16 14:47:09 +0000 2395) if ( isGlobalGeneratorNameGlobal( buildingContext ) ) { b1a9c816a hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Andrea Boriero 2017-12-13 15:38:00 +0000 2396) buildGenerators( idXProperty, buildingContext ); @@ -2502,13 +2502,13 @@ d9a1022f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 3335710a3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2013-02-27 16:20:51 +0000 2502) } e14f58de2 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-09-28 16:28:30 +0000 2503) if ( !BinderHelper.isEmptyAnnotationValue( schema ) ) { d9a1022f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-07-20 23:24:38 +0000 2504) associationTableBinder.setSchema( schema ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2505) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2505) } e14f58de2 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-09-28 16:28:30 +0000 2506) if ( !BinderHelper.isEmptyAnnotationValue( catalog ) ) { d9a1022f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-07-20 23:24:38 +0000 2507) associationTableBinder.setCatalog( catalog ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2508) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2508) } e14f58de2 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-09-28 16:28:30 +0000 2509) if ( !BinderHelper.isEmptyAnnotationValue( tableName ) ) { d9a1022f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-07-20 23:24:38 +0000 2510) associationTableBinder.setName( tableName ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2511) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2511) } d9a1022f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-07-20 23:24:38 +0000 2512) associationTableBinder.setUniqueConstraints( uniqueConstraints ); 3335710a3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Strong Liu 2013-02-27 16:20:51 +0000 2513) associationTableBinder.setJpaIndex( jpaIndexes ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2514) //set check constaint in the second pass @@ -2672,7 +2672,7 @@ f0f82e4f1 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2672) List baseClassElements = null; 8f889e95d hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Andrea Boriero 2018-03-28 22:43:48 +0000 2673) Map orderedBaseClassElements = new HashMap<>(); 2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2674) XClass baseReturnedClassOrElement; -2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2675) if ( baseInferredData != null ) { +252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2675) if ( baseInferredData != null ) { 8f889e95d hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Andrea Boriero 2018-03-28 22:43:48 +0000 2676) baseClassElements = new ArrayList<>(); 2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2677) baseReturnedClassOrElement = baseInferredData.getClassOrElement(); 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 2678) bindTypeDefs( baseReturnedClassOrElement, buildingContext ); @@ -2701,10 +2701,10 @@ f0f82e4f1 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 1183a4719 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-11-20 18:50:14 +0000 2701) addElementsOfClass( classElements, propContainer, buildingContext ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2702) superClass = superClass.getSuperclass(); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2703) } -2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2704) if ( baseClassElements != null ) { +c7c6981a5 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-10-28 18:14:25 +0000 2704) if ( baseClassElements != null ) { 252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2705) //useful to avoid breaking pre JPA 2 mappings 8478d5b44 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-05 23:33:28 +0000 2706) if ( !hasAnnotationsOnIdClass( xClassProcessed ) ) { -2176af114 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-10-27 15:05:44 +0000 2707) for ( int i = 0; i < classElements.size(); i++ ) { +c7c6981a5 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2009-10-28 18:14:25 +0000 2707) for ( int i = 0; i < classElements.size(); i++ ) { 252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2708) final PropertyData idClassPropertyData = classElements.get( i ); 252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2709) final PropertyData entityPropertyData = orderedBaseClassElements.get( idClassPropertyData.getPropertyName() ); 252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2710) if ( propertyHolder.isInIdClass() ) { @@ -2752,7 +2752,7 @@ f0f82e4f1 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 2752) 2adcb4d92 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Ståle W. Pedersen 2010-01-26 13:39:26 +0000 2753) XProperty property = propertyAnnotatedElement.getProperty(); 2adcb4d92 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Ståle W. Pedersen 2010-01-26 13:39:26 +0000 2754) if ( property.isAnnotationPresent( GeneratedValue.class ) && -2adcb4d92 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Ståle W. Pedersen 2010-01-26 13:39:26 +0000 2755) property.isAnnotationPresent( Id.class ) ) { +252299cfe annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-04 17:54:05 +0000 2755) property.isAnnotationPresent( Id.class ) ) { 2adcb4d92 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Ståle W. Pedersen 2010-01-26 13:39:26 +0000 2756) GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class ); 9caca0ce3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2015-03-10 21:53:51 +0000 2757) String generatorType = generatedValue != null 99428251c hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2017-12-13 12:19:31 +0000 2758) ? generatorType( generatedValue, buildingContext, property.getType() ) @@ -2947,9 +2947,9 @@ fb9bdb7f3 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 8478d5b44 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-02-05 23:33:28 +0000 2947) } 2948) 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2949) private static void setupComponentTuplizer(XProperty property, Component component) { -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2950) if ( property == null ) { +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2950) if ( property == null ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2951) return; -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2952) } +153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 2952) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2953) if ( property.isAnnotationPresent( Tuplizers.class ) ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2954) for ( Tuplizer tuplizer : property.getAnnotation( Tuplizers.class ).value() ) { 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 2955) EntityMode mode = EntityMode.parse( tuplizer.entityMode() ); @@ -3018,10 +3018,10 @@ aeb3aee62 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 368457612 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:44:12 +0000 3018) columnName = prop.getAnnotation( Column.class ).name(); 368457612 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:44:12 +0000 3019) } 3020) -59ec34d5b core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 14:05:41 +0000 3021) if ( property.isAnnotationPresent( ManyToOne.class ) && joinColumn != null +3b3c8bc92 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:45:09 +0000 3021) if ( property.isAnnotationPresent( ManyToOne.class ) && joinColumn != null 59ec34d5b core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 14:05:41 +0000 3022) && ! BinderHelper.isEmptyAnnotationValue( joinColumn.name() ) -59ec34d5b core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 14:05:41 +0000 3023) && joinColumn.name().equals( columnName ) -59ec34d5b core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 14:05:41 +0000 3024) && !property.isAnnotationPresent( MapsId.class ) ) { +368457612 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:44:12 +0000 3023) && joinColumn.name().equals( columnName ) +3b3c8bc92 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:45:09 +0000 3024) && !property.isAnnotationPresent( MapsId.class ) ) { 3b3c8bc92 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:45:09 +0000 3025) hasSpecjManyToOne = true; 368457612 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:44:12 +0000 3026) for ( Ejb3JoinColumn column : columns ) { 368457612 core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Emmanuel Bernard 2010-10-04 09:44:12 +0000 3027) column.setInsertable( false ); @@ -3488,9 +3488,9 @@ b1a9c816a hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java ( 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 3488) if ( superclassState.getType() != null ) { 153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 3489) final boolean mixingStrategy = state.getType() != null && !state.getType() 153ad753e annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2010-03-04 21:55:10 +0000 3490) .equals( superclassState.getType() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 3491) if ( nonDefault && mixingStrategy ) { +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 3491) if ( nonDefault && mixingStrategy ) { a9b1425f3 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (JPAV 2011-01-18 21:35:49 +0000 3492) LOG.invalidSubStrategy( clazz.getName() ); -7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 3493) } +129c0f134 hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Sanne Grinovero 2011-10-26 22:24:15 +0000 3493) } 025b3cc14 annotations/src/main/java/org/hibernate/cfg/AnnotationBinder.java (Hardy Ferentschik 2009-12-11 19:14:01 +0000 3494) state.setType( superclassState.getType() ); 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 3495) } 7337743c9 annotations/src/java/org/hibernate/cfg/AnnotationBinder.java (Steve Ebersole 2008-10-28 18:41:10 +0000 3496) }